diff options
author | David Athay <ko2fan@gmail.com> | 2009-02-11 09:30:26 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-02-11 09:30:26 +0000 |
commit | 91111ca5d13072ea3b834e23835df9c077329e39 (patch) | |
tree | f0af8dd08b766164835cf9b5412a9aa3267dbad7 /src/utils | |
parent | 8046bb2626b30fecdcea54eb0aa3349cdb7d277b (diff) | |
parent | 63ac001daa7dfc0735dfefd9c2829c8786b4edaf (diff) | |
download | mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.gz mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.bz2 mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.xz mana-client-91111ca5d13072ea3b834e23835df9c077329e39.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/base64.cpp | 2 | ||||
-rw-r--r-- | src/utils/strprintf.cpp | 1 | ||||
-rw-r--r-- | src/utils/tostring.h | 15 | ||||
-rw-r--r-- | src/utils/xml.cpp | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp index 8cea60f9..9d8ba836 100644 --- a/src/utils/base64.cpp +++ b/src/utils/base64.cpp @@ -27,8 +27,8 @@ +----------------------------------------------------------------------+ */ -#include <string.h> #include <stdlib.h> +#include <string.h> #include "base64.h" diff --git a/src/utils/strprintf.cpp b/src/utils/strprintf.cpp index bed4a7c4..07fb3508 100644 --- a/src/utils/strprintf.cpp +++ b/src/utils/strprintf.cpp @@ -45,3 +45,4 @@ std::string strprintf(char const *format, ...) delete [] buf2; return res; } + 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 diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index f6498c9f..d5dd54be 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -20,7 +20,9 @@ */ #include "xml.h" + #include "../log.h" + #include "../resources/resourcemanager.h" namespace XML |