Moved the private functions out of the anonymous namespace, because I need to use them in other places

master
Aadhavan Srinivasan 10 months ago
parent f3ad4fbf99
commit 7e362f0ed9

@ -8,8 +8,6 @@
namespace connect_code { namespace connect_code {
/* Since these are private functions, I have wrapped them in an anonymous namespace, to prevent outside access to them */
namespace {
/* Tokenizes a string, based on the given delimiter */ /* Tokenizes a string, based on the given delimiter */
std::vector<std::string> tokenize_str(std::string str, std::string delim) { std::vector<std::string> tokenize_str(std::string str, std::string delim) {
std::vector<std::string> result; std::vector<std::string> result;
@ -44,7 +42,6 @@ namespace connect_code {
uint32_t addr_val = (std::stoul(octets[0]) << 24) + (std::stoul(octets[1]) << 16) + (std::stoul(octets[2]) << 8) + (std::stoul(octets[3])); uint32_t addr_val = (std::stoul(octets[0]) << 24) + (std::stoul(octets[1]) << 16) + (std::stoul(octets[2]) << 8) + (std::stoul(octets[3]));
return std::to_string(addr_val); return std::to_string(addr_val);
} }
}
std::string encode(std::string address, std::string port) { std::string encode(std::string address, std::string port) {

Loading…
Cancel
Save