From f4777a194bc4a9f93e2651090a2b5c9499bbff3d Mon Sep 17 00:00:00 2001 From: David L Parkhurst Date: Wed, 7 Nov 2007 22:23:47 +0000 Subject: [PATCH] Fixed bug, and streamlined. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2376 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- Solution.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Solution.cxx b/Solution.cxx index 828fdf15..2970c091 100644 --- a/Solution.cxx +++ b/Solution.cxx @@ -865,8 +865,17 @@ double cxxSolution::get_total_element(char *string)const d += it->second; } #endif + char token[MAX_LENGTH], token1[MAX_LENGTH]; + int n; + char *ptr; + strcpy(token, it->first); + replace("(", "\0", token); + if (strcmp(token, string) == 0) { + d += it->second; + } +#ifdef SKIP std::string ename(string); - std::string current_ename(string); + std::string current_ename(it->first); std::basic_string ::size_type indexCh; indexCh = current_ename.find("("); if (indexCh != std::string::npos) @@ -877,6 +886,7 @@ double cxxSolution::get_total_element(char *string)const { d += it->second; } +#endif } return(d); }