Przeglądaj źródła

HPCC-9602 Avoid temporary variables when returing simple expressions

The "very temporary" fix has been in there for many many years, and has
been redundant for most of them.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 12 lat temu
rodzic
commit
2b3d529540
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      ecl/hqlcpp/hqlcpp.cpp

+ 1 - 3
ecl/hqlcpp/hqlcpp.cpp

@@ -3419,10 +3419,8 @@ void HqlCppTranslator::buildReturn(BuildCtx & ctx, IHqlExpression * expr, ITypeI
     else
     {
         CHqlBoundExpr ret;
-        // A very temporary work around for potential gpf using variable length strings
         OwnedHqlExpr castExpr = ensureExprType(expr, retType);
-        buildSimpleExpr(ctx, castExpr, ret);
-        ctx.setNextDestructor();
+        buildExpr(ctx, castExpr, ret);
         ctx.addReturn(ret.expr);
     }
 }