improving again the protocol system, fixing some pointer issues that might appear

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13164 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hilnius
2013-07-10 22:46:23 +00:00
parent 212b77fef3
commit 3c3868210f
21 changed files with 443 additions and 263 deletions

View File

@@ -141,6 +141,7 @@ class NetworkString
inline uint8_t getUInt8(int pos = 0) { return get<uint8_t,1>(pos); }
inline char getChar(int pos = 0) { return get<char,1>(pos); }
inline unsigned char getUChar(int pos = 0) { return get<unsigned char,1>(pos); }
std::string getString(int pos = 0) { return std::string(m_string.c_str()+pos); }
inline int gi(int pos = 0) { return get<int,4>(pos); }
inline uint32_t gui(int pos = 0) { return get<uint32_t,4>(pos); }
@@ -149,6 +150,7 @@ class NetworkString
inline uint8_t gui8(int pos = 0) { return get<uint8_t,1>(pos); }
inline char gc(int pos = 0) { return get<char,1>(pos); }
inline unsigned char guc(int pos = 0) { return get<unsigned char,1>(pos); }
std::string gs(int pos = 0) { return std::string(m_string.c_str()+pos); }
double getDouble(int pos = 0) //!< BEWARE OF PRECISION
{