diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 23:47:02 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 23:47:02 +0100 |
commit | fa2f3ac593a792c32095c2e885665ec91bb4019d (patch) | |
tree | f44aee845f0229dfcc6b2ad3c74613e0352f36c2 /src/utils/tostring.h | |
parent | 07f7d52f661a74e6d0c780ca53e724651e3dcc48 (diff) | |
parent | 40edf4e91558cffd83d9015a2cf4a16360e27855 (diff) | |
download | mana-client-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.gz mana-client-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.bz2 mana-client-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.xz mana-client-fa2f3ac593a792c32095c2e885665ec91bb4019d.zip |
Merged with Aethyra master as of 2009-02-09
Conflicts:
A lot of files...
Diffstat (limited to 'src/utils/tostring.h')
-rw-r--r-- | src/utils/tostring.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/tostring.h b/src/utils/tostring.h index 5ac1d3aa..62eb44e4 100644 --- a/src/utils/tostring.h +++ b/src/utils/tostring.h @@ -32,4 +32,19 @@ std::string toString(const T &arg) return ss.str(); } +// TODO: Is there a good way to suppress warnings from classes which don't use +// this function? +inline char *iptostring(int address) +{ + static char asciiIP[16]; + + sprintf(asciiIP, "%i.%i.%i.%i", + (unsigned char)(address), + (unsigned char)(address >> 8), + (unsigned char)(address >> 16), + (unsigned char)(address >> 24)); + + return asciiIP; +} + #endif |