[Compbench-devel] CompBenchmarks++/libcompbenchmarks/CEL CEL-Function.cpp, 1.2, 1.3 CEL-Function.h,
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-03-18 22:59:37
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3169 Modified Files: CEL-Function.cpp CEL-Function.h Log Message: Function can be undefined. Index: CEL-Function.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Function.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Function.cpp 11 Mar 2007 18:47:49 -0000 1.2 --- CEL-Function.cpp 18 Mar 2007 21:47:18 -0000 1.3 *************** *** 19,23 **** std::vector<celFunction_t*> celFunctions; - celFunction_t *celFunctionGet(std::string _name) { --- 19,22 ---- *************** *** 34,37 **** --- 33,58 ---- } + void CBM::CELFunctionUndef(std::string _id) + { + celFunction_t *f = celFunctionGet(_id); + std::vector<celFunction_t*> ncelFunctions; + int i; + int n; + + if (!f) + return; + + n=celFunctions.size(); + + for(i=0;i<n;i++) { + if (celFunctions[i]!=f) { + ncelFunctions.push_back(celFunctions[i]); + } + } + + delete(f); + celFunctions=ncelFunctions; + } + void CBM::CELFunctionDone(void) { Index: CEL-Function.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Function.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Function.h 11 Mar 2007 18:47:49 -0000 1.2 --- CEL-Function.h 18 Mar 2007 21:47:18 -0000 1.3 *************** *** 14,17 **** --- 14,19 ---- void CELFunctionDone(void); + + void CELFunctionUndef(std::string _id); /** \brief ? */ |