diff --git a/source/network/NetServer.cpp b/source/network/NetServer.cpp index 95b5ab3e00..8734e7a2e4 100644 --- a/source/network/NetServer.cpp +++ b/source/network/NetServer.cpp @@ -710,7 +710,7 @@ CStrW CNetServerWorker::DeduplicatePlayerName(const CStrW& original) if (unique) return name; - name = original + L" (" + CStrW((unsigned long)id++) + L")"; + name = original + L" (" + CStrW(id++) + L")"; } } diff --git a/source/network/NetStats.cpp b/source/network/NetStats.cpp index 0df9bdbcb8..e965763453 100644 --- a/source/network/NetStats.cpp +++ b/source/network/NetStats.cpp @@ -78,7 +78,7 @@ const std::vector& CNetStatsTable::GetColumns() CScopeLock lock(m_Mutex); for (size_t i = 0; i < m_LatchedData.size(); ++i) - m_ColumnDescriptions.push_back(ProfileColumn("Peer "+CStr((unsigned long)i), 80)); + m_ColumnDescriptions.push_back(ProfileColumn("Peer "+CStr(i), 80)); } return m_ColumnDescriptions; } diff --git a/source/ps/CStr.cpp b/source/ps/CStr.cpp index 682ec88403..43770fe9ee 100644 --- a/source/ps/CStr.cpp +++ b/source/ps/CStr.cpp @@ -101,20 +101,12 @@ CStr CStr::Repeat(const CStr& String, size_t Reps) std::tstringstream ss; \ ss << Number; \ ss >> *this; \ - } \ - \ - CStr& CStr::operator=(T Number) \ - { \ - std::tstringstream ss; \ - ss << Number; \ - ss >> *this; \ - return *this; \ } -NUM_TYPE(int) -NUM_TYPE(long) -NUM_TYPE(unsigned int) -NUM_TYPE(unsigned long) +NUM_TYPE(i32) +NUM_TYPE(i64) +NUM_TYPE(u32) +NUM_TYPE(u64) NUM_TYPE(float) NUM_TYPE(double) diff --git a/source/ps/CStr.h b/source/ps/CStr.h index 16d31f7702..c92dab5ff9 100644 --- a/source/ps/CStr.h +++ b/source/ps/CStr.h @@ -167,49 +167,14 @@ public: CStrW FromUTF8() const; #endif - /** - * Alternate Constructor - * - * @param int Number integer to be used for initialization - **/ - CStr(int Number); - /** - * Alternate Constructor - * - * @param unsigned int Number unsigned integer to be used for initialization - **/ - CStr(unsigned int Number); - /** - * Alternate Constructor - * - * @param long Number long to be used for initialization - **/ - CStr(long Number); - /** - * Alternate Constructor - * - * @param unsigned long Number unsigned long to be used for initialization - **/ - CStr(unsigned long Number); - /** - * Alternate Constructor - * - * @param float Number float to be used for initialization - **/ + // Construct from string representation of number + CStr(i32 Number); + CStr(u32 Number); + CStr(i64 Number); + CStr(u64 Number); CStr(float Number); - /** - * Alternate Constructor - * - * @param double Number double to be used for initialization - **/ CStr(double Number); - /** - * Destructor - * - **/ - //~CStr() {}; - // Conversions: /** @@ -437,49 +402,6 @@ public: // Overloaded operations - /** - * Set the CStr equal to an integer. - * - * @param int Number integer to convert to a CStr. - * @return CStr - **/ - CStr& operator=(int Number); - /** - * Set the CStr equal to a long. - * - * @param long Number long to convert to a CStr. - * @return CStr - **/ - CStr& operator=(long Number); - /** - * Set the CStr equal to an unsigned integer. - * - * @param unsigned int Number unsigned int to convert to a CStr. - * @return CStr - **/ - CStr& operator=(unsigned int Number); - /** - * Set the CStr equal to an unsigned long. - * - * @param unsigned long Number unsigned long to convert to a CStr. - * @return CStr - **/ - CStr& operator=(unsigned long Number); - /** - * Set the CStr equal to a float. - * - * @param float Number float to convert to a CStr. - * @return CStr - **/ - CStr& operator=(float Number); - /** - * Set the CStr equal to a double. - * - * @param double Number double to convert to a CStr. - * @return CStr - **/ - CStr& operator=(double Number); - CStr operator+(const CStr& Str); CStr operator+(const tchar* Str); #ifndef _UNICODE