zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #15532
[Merge] lp:~zorba-coders/zorba/xqxq-bug1068240 into lp:zorba/xqxq-module
Juan Zacarias has proposed merging lp:~zorba-coders/zorba/xqxq-bug1068240 into lp:zorba/xqxq-module.
Commit message:
Removed cast to const for the DynamicContext.
Requested reviews:
Matthias Brantner (matthias-brantner)
Related bugs:
Bug #855925 in Zorba: "C++ API, DynamicContext is passed as a const argument to the function's evaluate method"
https://bugs.launchpad.net/zorba/+bug/855925
Bug #1068240 in Zorba: "make addExternalFunctionParameter const"
https://bugs.launchpad.net/zorba/+bug/1068240
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xqxq-bug1068240/+merge/130867
Removed cast to const for the DynamicContext.
--
https://code.launchpad.net/~zorba-coders/zorba/xqxq-bug1068240/+merge/130867
Your team Zorba Coders is subscribed to branch lp:zorba/xqxq-module.
=== modified file 'src/xqxq.xq.src/xqxq.cpp'
--- src/xqxq.xq.src/xqxq.cpp 2012-10-20 02:18:45 +0000
+++ src/xqxq.xq.src/xqxq.cpp 2012-10-22 17:25:22 +0000
@@ -374,14 +374,13 @@
const zorba::StaticContext* aSctx,
const zorba::DynamicContext* aDctx) const
{
- DynamicContext* lDynCtx = const_cast<DynamicContext*>(aDctx);
StaticContext_t lSctxChild = aSctx->createChildContext();
QueryMap* lQueryMap;
- if(!(lQueryMap = dynamic_cast<QueryMap*>(lDynCtx->getExternalFunctionParameter("xqxqQueryMap"))))
+ if(!(lQueryMap = dynamic_cast<QueryMap*>(aDctx->getExternalFunctionParameter("xqxqQueryMap"))))
{
lQueryMap = new QueryMap();
- lDynCtx->addExternalFunctionParameter("xqxqQueryMap", lQueryMap);
+ aDctx->addExternalFunctionParameter("xqxqQueryMap", lQueryMap);
}
Zorba *lZorba = Zorba::getInstance(0);
Follow ups