Changeset 85273 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 12, 2020 1:14:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/PerformanceImpl.cpp
r82968 r85273 322 322 323 323 aMetrics.resize(filteredMetrics.size()); 324 int i = 0;324 size_t i = 0; 325 325 for (it = filteredMetrics.begin(); it != filteredMetrics.end(); ++it) 326 326 { … … 330 330 rc = metric->init(*it); 331 331 AssertComRCReturnRC(rc); 332 LogFlow(("PerformanceCollector::GetMetrics() store a metric at retMetrics[% d]...\n", i));332 LogFlow(("PerformanceCollector::GetMetrics() store a metric at retMetrics[%zu]...\n", i)); 333 333 aMetrics[i++] = metric; 334 334 } … … 375 375 376 376 aAffectedMetrics.resize(filteredMetrics.size()); 377 int i = 0;377 size_t i = 0; 378 378 for (it = filteredMetrics.begin(); 379 379 it != filteredMetrics.end() && SUCCEEDED(rc); ++it) … … 409 409 410 410 aAffectedMetrics.resize(filteredMetrics.size()); 411 int i = 0;411 size_t i = 0; 412 412 for (it = filteredMetrics.begin(); 413 413 it != filteredMetrics.end() && SUCCEEDED(rc); ++it) … … 445 445 446 446 aAffectedMetrics.resize(filteredMetrics.size()); 447 int i = 0;447 size_t i = 0; 448 448 for (it = filteredMetrics.begin(); 449 449 it != filteredMetrics.end() && SUCCEEDED(rc); ++it) … … 484 484 } 485 485 486 int i = 0;487 486 size_t flatIndex = 0; 488 487 size_t numberOfMetrics = filteredMetrics.size(); … … 496 495 aReturnData.resize(flatSize); 497 496 497 size_t i = 0; 498 498 for (it = filteredMetrics.begin(); it != filteredMetrics.end(); ++it, ++i) 499 499 { … … 699 699 */ 700 700 Log7Func(("{%p}: before remove_if: toBeCollected.size()=%d\n", this, toBeCollected.size())); 701 #if RT_CPLUSPLUS_PREREQ(201100) /* mem_fun is deprecated in C++11 and removed in C++17 */ 702 toBeCollected.remove_if(std::mem_fn(&pm::BaseMetric::isUnregistered)); 703 #else 701 704 toBeCollected.remove_if(std::mem_fun(&pm::BaseMetric::isUnregistered)); 705 #endif 702 706 Log7Func(("{%p}: after remove_if: toBeCollected.size()=%d\n", this, toBeCollected.size())); 703 707 Log7Func(("{%p}: before remove_if: m.baseMetrics.size()=%d\n", this, m.baseMetrics.size())); … … 719 723 720 724 /* Finally, collect the data */ 721 std::for_each(toBeCollected.begin(), toBeCollected.end(), 722 std::mem_fun(&pm::BaseMetric::collect)); 725 #if RT_CPLUSPLUS_PREREQ(201100) /* mem_fun is deprecated in C++11 and removed in C++17 */ 726 std::for_each(toBeCollected.begin(), toBeCollected.end(), std::mem_fn(&pm::BaseMetric::collect)); 727 #else 728 std::for_each(toBeCollected.begin(), toBeCollected.end(), std::mem_fun(&pm::BaseMetric::collect)); 729 #endif 723 730 Log4Func(("{%p}: LEAVE\n", this)); 724 731 } … … 770 777 m.count = aMetric->getLength(); 771 778 m.unit = aMetric->getUnit(); 772 m.min = aMetric->getMinValue(); 773 m.max = aMetric->getMaxValue(); 779 /** @todo r=bird: LONG/ULONG mixup. */ 780 m.min = (LONG)aMetric->getMinValue(); 781 m.max = (LONG)aMetric->getMaxValue(); 774 782 775 783 autoInitSpan.setSucceeded(); … … 789 797 m.count = aMetric->getLength(); 790 798 m.unit = aMetric->getUnit(); 791 m.min = aMetric->getMinValue(); 792 m.max = aMetric->getMaxValue(); 799 /** @todo r=bird: LONG/ULONG mixup. */ 800 m.min = (LONG)aMetric->getMinValue(); 801 m.max = (LONG)aMetric->getMaxValue(); 793 802 794 803 autoInitSpan.setSucceeded();
Note:
See TracChangeset
for help on using the changeset viewer.