diff --git a/source/ps/CStr.cpp b/source/ps/CStr.cpp index 7c1c3ce37b..52cb9578ac 100755 --- a/source/ps/CStr.cpp +++ b/source/ps/CStr.cpp @@ -342,13 +342,13 @@ _bool CStr::operator>=(const CStr &Str) const return (m_String >= Str.m_String); } -CStr &CStr::operator+=(CStr &Str) +CStr &CStr::operator+=(const CStr &Str) { m_String += Str.m_String; return *this; } -CStr CStr::operator+(CStr &Str) +CStr CStr::operator+(const CStr &Str) { CStr NewStr(*this); NewStr.m_String += Str.m_String; @@ -393,4 +393,4 @@ ostream &operator<<(ostream &os, CStr &Str) { os << (const TCHAR*)Str; return os; -} \ No newline at end of file +} diff --git a/source/ps/CStr.h b/source/ps/CStr.h index 5346c6ce31..dad64bfecf 100755 --- a/source/ps/CStr.h +++ b/source/ps/CStr.h @@ -38,6 +38,7 @@ More Info: #include #include "posix.h" +#include "misc.h" #include using namespace std; @@ -161,8 +162,8 @@ public: _bool operator<=(const CStr &Str) const; _bool operator>(const CStr &Str) const; _bool operator>=(const CStr &Str) const; - CStr &operator+=(CStr &Str); - CStr operator+(CStr &Str); + CStr &operator+=(const CStr &Str); + CStr operator+(const CStr &Str); operator const TCHAR*(); operator const TCHAR*() const; // Gee, I've added this, Maybe the one above should be removed? TCHAR &operator[](_int n); diff --git a/source/ps/LogFile.cpp b/source/ps/LogFile.cpp index ed3df1733b..f3de796ec2 100755 --- a/source/ps/LogFile.cpp +++ b/source/ps/LogFile.cpp @@ -1,6 +1,7 @@ // last modified Thursday, May 08, 2003 #include "LogFile.h" +#include "misc.h" //------------------------------------------------- //Add a hyperlink to Link. @@ -328,7 +329,7 @@ string CLogFile::Line(const PS_DISPLAY_SETTINGS &options) lineText = options.file; char temp[8]; - itoa(options.line, temp, 10); + _itoa(options.line, temp, 10); lineText += ", Line "; lineText += temp; lineText += ": "; @@ -352,4 +353,4 @@ string CLogFile::Date(const PS_DISPLAY_SETTINGS &options) } return dateText; -} \ No newline at end of file +} diff --git a/source/ps/Parser.cpp b/source/ps/Parser.cpp index af970fd5b3..ce45b4a57d 100755 --- a/source/ps/Parser.cpp +++ b/source/ps/Parser.cpp @@ -143,7 +143,7 @@ _bool CParserValue::GetDouble(_double &ret) // Check if a digit is found if (m_String[i] >= '0' && m_String[i] <= '9') { - TempRet += (m_String[i]-'0')*pow(10,(DecimalPos-i-1)); + TempRet += (m_String[i]-'0')*pow(double(10),(DecimalPos-i-1)); } else { @@ -162,7 +162,7 @@ _bool CParserValue::GetDouble(_double &ret) // Check if a digit is found if (m_String[i] >= '0' && m_String[i] <= '9') { - TempRet += (m_String[i]-'0')*pow(10,DecimalPos-i); + TempRet += (m_String[i]-'0')*pow(double(10),DecimalPos-i); } // It will accept and ending f, like 1.0f else if (!(i==Size-1 && m_String[i] == 'f')) @@ -1007,4 +1007,4 @@ _bool CParser::InputTaskType(const string& strName, const string& strSyntax) } return !Error; -} \ No newline at end of file +}