OSSP CVS Repository

ossp - Check-in [4078]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4078
Date: 2003-Feb-24 18:39:04 (local)
2003-Feb-24 17:39:04 (UTC)
User:ms
Branch:
Comment: Fix bug causing merging of independent account entries.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_reportpanel.cpp      1.12 -> 1.13     12 inserted, 12 deleted

ossp-pkg/as/as-gui/as_reportpanel.cpp 1.12 -> 1.13

--- as_reportpanel.cpp   2003/02/21 23:44:36     1.12
+++ as_reportpanel.cpp   2003/02/24 17:39:04     1.13
@@ -478,11 +478,11 @@
 //
 QString Reportpanel::getWeektotals(QDate Dayref, int nWeeks)
 {
-    using namespace std;                    // Needed for hash tables with hmap
-    map<string, string> Hashtasks;          // Hashtable for storing tasks
-    map<string, string> Hashhours;          // Hashtable for storing hours
-    map<string, string>::iterator Taskiter; // The hashtable task iterator
-    map<string, string>::iterator Houriter; // The hashtable hour iterator
+    using namespace std;                            // Needed for maps and hash
+    map<string, string> Hashtasks;                  // Hashtable to store tasks
+    multimap<string, string> Hashhours;             // Hashtable to store hours
+    map<string, string>::iterator Taskiter;         // Hashtable task iterator
+    multimap<string, string>::iterator Houriter;    // Hashtable hour iterator
 
     QString Totals;                         // Data totals to return for writing
     QString Tempstring;                     // Temporary processing string
@@ -527,7 +527,7 @@
 
     // Reverse copy the tasks hashtable to both sort and index by amount key
     for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++)
-        Hashhours[Taskiter->second] = Taskiter->first;
+        Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first));
 
     // Write the actual data totals to the outgoing string in reverse order
     for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++)
@@ -596,11 +596,11 @@
 //
 QString Reportpanel::getMonthtotals(QDate Dayref, int nMonths)
 {
-    using namespace std;                    // Needed for hash tables with hmap
-    map<string, string> Hashtasks;          // Hashtable for storing tasks
-    map<string, string> Hashhours;          // Hashtable for storing hours
-    map<string, string>::iterator Taskiter; // The hashtable task iterator
-    map<string, string>::iterator Houriter; // The hashtable hour iterator
+    using namespace std;                            // Needed for maps and hash
+    map<string, string> Hashtasks;                  // Hashtable to store tasks
+    multimap<string, string> Hashhours;             // Hashtable to store hours
+    map<string, string>::iterator Taskiter;         // Hashtable task iterator
+    multimap<string, string>::iterator Houriter;    // Hashtable hour iterator
 
     QString Totals;                         // Data totals to return for writing
     QString Tempstring;                     // Temporary processing string
@@ -647,7 +647,7 @@
 
     // Reverse copy the tasks hashtable to both sort and index by amount key
     for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++)
-        Hashhours[Taskiter->second] = Taskiter->first;
+        Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first));
 
     // Write the actual data totals to the outgoing string in reverse order
     for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++)

CVSTrac 2.0.1