forked from 0ad/0ad
Linux compat, const qualifiers, newlines at end of file =)
This was SVN commit r87.
This commit is contained in:
parent
b732a1e1c5
commit
a26fdd8f5c
@ -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;
|
||||
|
@ -38,6 +38,7 @@ More Info:
|
||||
#include <iostream>
|
||||
|
||||
#include "posix.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <cstdlib>
|
||||
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);
|
||||
|
@ -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 += ": ";
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user