Fix ambiguous overload resolution
One operator+ for CBotString is enoughdev-time-step
parent
eeea31408b
commit
13f0159705
|
@ -397,7 +397,6 @@ public:
|
|||
const CBotString& operator=(const CBotString& stringSrc);
|
||||
const CBotString& operator=(const char ch);
|
||||
const CBotString& operator=(const char* pString);
|
||||
friend CBotString operator+(const CBotString& string, const char* lpsz);
|
||||
CBotString operator+(const CBotString& str);
|
||||
|
||||
const CBotString& operator+=(const char ch);
|
||||
|
|
|
@ -216,7 +216,7 @@ CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunct
|
|||
|
||||
if ( IsOfType(p, ID_NOT) )
|
||||
{
|
||||
CBotToken d("~" + p->GetString());
|
||||
CBotToken d(CBotString("~") + p->GetString());
|
||||
func->m_token = d;
|
||||
}
|
||||
|
||||
|
|
|
@ -337,13 +337,6 @@ const CBotString& CBotString::operator=(const CBotString& stringSrc)
|
|||
return *this;
|
||||
}
|
||||
|
||||
CBotString operator+(const CBotString& string, const char * lpsz)
|
||||
{
|
||||
CBotString s(string);
|
||||
s += lpsz;
|
||||
return s;
|
||||
}
|
||||
|
||||
CBotString CBotString::operator+(const CBotString& stringSrc)
|
||||
{
|
||||
CBotString s(*this);
|
||||
|
|
|
@ -1703,7 +1703,7 @@ void CBotVarClass::DecrementUse()
|
|||
pThis->SetPointer(this);
|
||||
CBotVar* pResult = nullptr;
|
||||
|
||||
CBotString nom = "~" + m_pClass->GetName();
|
||||
CBotString nom = CBotString("~") + m_pClass->GetName();
|
||||
long ident = 0;
|
||||
|
||||
while ( pile->IsOk() && !m_pClass->ExecuteMethode(ident, nom, pThis, ppVars, pResult, pile, nullptr)) ; // waits for the end
|
||||
|
|
|
@ -277,9 +277,6 @@ TEST(CBotString_Test, operatorAdd)
|
|||
botStr1 = botStr1 + botStr3;
|
||||
EXPECT_STREQ(botStr1.CStr(), botStr4.CStr());
|
||||
|
||||
botStr1 = "C" + botStr3;
|
||||
EXPECT_STREQ(botStr1.CStr(), botStr4.CStr());
|
||||
|
||||
botStr1.Empty();
|
||||
botStr1 = botStr2 + cStr1;
|
||||
EXPECT_STREQ(botStr1.CStr(), botStr4.CStr());
|
||||
|
|
Loading…
Reference in New Issue