From 57f63f65c206cce84c23e5a9a1c30b950174b370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 20 Feb 2010 08:53:33 +0100 Subject: [PATCH] Borland C++: Fixed compiler errors (operands must be same type) --- lib/checkmemoryleak.cpp | 2 +- lib/tokenize.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 5b7c1508c..ceecacdf5 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -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(); diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 6cd818386..509b415ed 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -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()));