Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
SocksProxy: inline one-line definitions
Browse files Browse the repository at this point in the history
Merge one-line definitions with declarations in the header file.
  • Loading branch information
coneiric committed Aug 22, 2018
1 parent 418ea8f commit d4fd487
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
10 changes: 0 additions & 10 deletions src/client/proxy/socks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,5 @@ void SOCKSDNSAddress::FromString(std::string str)
memcpy(value, str.c_str(), size);
}

std::string SOCKSDNSAddress::ToString()
{
return std::string(value, size);
}

void SOCKSDNSAddress::PushBack(char c)
{
value[size++] = c;
}

} // namespace client
} // namespace kovri
12 changes: 9 additions & 3 deletions src/client/proxy/socks.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ struct SOCKSDNSAddress {

void FromString(std::string str);

std::string ToString();

void PushBack(char c);
std::string ToString()
{
return std::string(value, size);
}

void PushBack(char c)
{
value[size++] = c;
}
};

class SOCKSHandler
Expand Down

0 comments on commit d4fd487

Please sign in to comment.