Fixed compilation with GCC/Clang

src/scripting/backend/codegen.cpp:317:35: error: cannot initialize return object of type 'FxExpression *' with an rvalue of type 'bool'
This commit is contained in:
alexey.lysiuk 2017-03-18 14:31:15 +02:00
parent b416322032
commit 0130fc27cc

View file

@ -314,7 +314,7 @@ static bool AreCompatiblePointerTypes(PType *dest, PType *source, bool forcompar
static FxExpression *StringConstToChar(FxExpression *basex)
{
if (!basex->isConstant()) return false;
if (!basex->isConstant()) return nullptr;
// Allow single character string literals be convertible to integers.
// This serves as workaround for not being able to use single quoted literals because those are taken for names.
ExpVal constval = static_cast<FxConstant *>(basex)->GetValue();