瀏覽代碼

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 年之前
父節點
當前提交
2b3d529540
共有 1 個文件被更改,包括 1 次插入3 次删除
  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);
     }
 }