Changeset 26122 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Feb 1, 2010 2:23:08 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57117
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/Performance.h
r22173 r26122 25 25 #include <VBox/com/defs.h> 26 26 #include <VBox/com/ptr.h> 27 #include <VBox/com/string.h> 27 28 28 29 #include <iprt/types.h> 29 30 #include <iprt/err.h> 30 31 31 #include <algorithm>32 32 #include <list> 33 #include <string>34 33 #include <vector> 35 36 namespace com37 {38 class Utf8Str;39 }40 34 41 35 namespace pm … … 84 78 typedef int HintFlags; 85 79 typedef std::pair<RTPROCESS, HintFlags> ProcessFlagsPair; 86 87 inline bool processEqual(ProcessFlagsPair pair, RTPROCESS process)88 {89 return pair.first == process;90 }91 80 92 81 class CollectorHints … … 130 119 { 131 120 ProcessList::iterator it; 132 133 it = std::find_if(mProcesses.begin(), 134 mProcesses.end(), 135 std::bind2nd(std::ptr_fun(processEqual), process)); 136 137 if (it != mProcesses.end()) 138 return *it; 121 for (it = mProcesses.begin(); it != mProcesses.end(); it++) 122 if (it->first == process) 123 return *it; 139 124 140 125 /* Not found -- add new */ … … 369 354 if (mAggregate) 370 355 { 371 mName += ":";372 mName += mAggregate->getName();356 mName.append(":"); 357 mName.append(mAggregate->getName()); 373 358 } 374 359 } … … 394 379 395 380 private: 396 std::string mName;381 iprt::MiniString mName; 397 382 BaseMetric *mBaseMetric; 398 383 SubMetric *mSubMetric; … … 409 394 static bool patternMatch(const char *pszPat, const char *pszName, 410 395 bool fSeenColon = false); 411 bool match(const ComPtr<IUnknown> object, const std::string &name) const;396 bool match(const ComPtr<IUnknown> object, const iprt::MiniString &name) const; 412 397 private: 413 398 void init(ComSafeArrayIn(IN_BSTR, metricNames), 414 399 ComSafeArrayIn(IUnknown * , objects)); 415 400 416 typedef std::pair<const ComPtr<IUnknown>, const std::string> FilterElement;401 typedef std::pair<const ComPtr<IUnknown>, const iprt::MiniString> FilterElement; 417 402 typedef std::list<FilterElement> ElementList; 418 403
Note:
See TracChangeset
for help on using the changeset viewer.