Borland C++: Fixed compiler errors (operands must be same type)
This commit is contained in:
parent
50b5278315
commit
57f63f65c2
|
@ -455,7 +455,7 @@ void CheckMemoryLeakInFunction::parse_noreturn()
|
|||
tok = tok->link();
|
||||
if (tok->str() == "(")
|
||||
{
|
||||
const std::string function_name((tok->previous() && tok->previous()->isName()) ? tok->strAt(-1) : "");
|
||||
const std::string function_name((tok->previous() && tok->previous()->isName()) ? tok->strAt(-1).c_str() : "");
|
||||
|
||||
tok = tok->link();
|
||||
|
||||
|
|
|
@ -4801,8 +4801,8 @@ bool Tokenizer::simplifyCalculations()
|
|||
MathLib::isInt(tok->str()) &&
|
||||
MathLib::isInt(tok->tokAt(2)->str()))
|
||||
{
|
||||
const std::string prev(tok->previous() ? tok->strAt(-1) : "");
|
||||
const std::string after(tok->tokAt(3) ? tok->strAt(3) : "");
|
||||
const std::string prev(tok->previous() ? tok->strAt(-1).c_str() : "");
|
||||
const std::string after(tok->tokAt(3) ? tok->strAt(3).c_str() : "");
|
||||
if ((prev == "(" || prev == "&&" || prev == "||") && (after == ")" || after == "&&" || after == "||"))
|
||||
{
|
||||
const int op1(MathLib::toLongNumber(tok->str()));
|
||||
|
|
Loading…
Reference in New Issue