@@ -3139,8 +3139,8 @@ class DiskReadBuilder : public DiskReadBuilderBase
3139
3139
virtual void analyseGraph (IHqlExpression * expr) override ;
3140
3140
3141
3141
void buildFormatOption (BuildCtx & ctx, IHqlExpression * name, IHqlExpression * value);
3142
- void buildFormatOptions (BuildCtx & fixedCtx, BuildCtx & dynCtx, IHqlExpression * expr);
3143
- void buildFormatOptions (IHqlExpression * expr);
3142
+ void buildFormatOptions (BuildCtx & fixedCtx, IHqlExpression * expr);
3143
+ void buildFormatOptionsFunction (IHqlExpression * expr);
3144
3144
};
3145
3145
3146
3146
@@ -3261,7 +3261,7 @@ void DiskReadBuilder::buildFormatOption(BuildCtx & ctx, IHqlExpression * name, I
3261
3261
}
3262
3262
}
3263
3263
3264
- void DiskReadBuilder::buildFormatOptions (BuildCtx & fixedCtx, BuildCtx & dynCtx , IHqlExpression * expr)
3264
+ void DiskReadBuilder::buildFormatOptions (BuildCtx & ctx , IHqlExpression * expr)
3265
3265
{
3266
3266
IHqlExpression * pluggableFileTypeAtom = expr->queryAttribute (fileTypeAtom); // null if pluggable file type not used
3267
3267
@@ -3276,24 +3276,21 @@ void DiskReadBuilder::buildFormatOptions(BuildCtx & fixedCtx, BuildCtx & dynCtx,
3276
3276
OwnedHqlExpr name = createConstant (str (cur->queryName ()));
3277
3277
if (cur->numChildren ())
3278
3278
{
3279
- BuildCtx & ctx = cur->isConstant () ? fixedCtx : dynCtx;
3280
3279
ForEachChild (c, cur)
3281
3280
buildFormatOption (ctx, name, cur->queryChild (c));
3282
3281
}
3283
3282
else
3284
- translator.buildXmlSerializeScalar (fixedCtx , queryBoolExpr (true ), name);
3283
+ translator.buildXmlSerializeScalar (ctx , queryBoolExpr (true ), name);
3285
3284
}
3286
3285
}
3287
3286
}
3288
3287
3289
- void DiskReadBuilder::buildFormatOptions (IHqlExpression * expr)
3288
+ void DiskReadBuilder::buildFormatOptionsFunction (IHqlExpression * expr)
3290
3289
{
3291
- MemberFunction fixedFunc (translator, instance->createctx , " virtual void getFormatOptions(IXmlWriter & out) override" , MFopt);
3292
- MemberFunction dynFunc (translator, instance->startctx , " virtual void getFormatDynOptions(IXmlWriter & out) override" , MFopt);
3290
+ MemberFunction formatFunc (translator, instance->createctx , " virtual void getFormatOptions(IXmlWriter & out) override" , MFopt);
3293
3291
3294
- buildFormatOptions (fixedFunc.ctx , dynFunc.ctx , expr);
3295
-
3296
- if (!dynFunc.isEmpty ())
3292
+ buildFormatOptions (formatFunc.ctx , expr);
3293
+ if (!expr->isConstant ())
3297
3294
hasDynamicOptions = true ;
3298
3295
}
3299
3296
@@ -3336,7 +3333,7 @@ void DiskReadBuilder::buildTransform(IHqlExpression * expr)
3336
3333
}
3337
3334
3338
3335
if (genericDiskRead)
3339
- buildFormatOptions (mode);
3336
+ buildFormatOptionsFunction (mode);
3340
3337
3341
3338
MemberFunction func (translator, instance->startctx );
3342
3339
if ((instance->kind == TAKdiskread) || (instance->kind == TAKspillread) || (instance->kind == TAKnewdiskread))
0 commit comments