Use new LocationData::Ptr typedef everywhere
authorMilian Wolff <mail@milianw.de>
Sat, 21 Jan 2017 22:48:46 +0000 (23:48 +0100)
committerMilian Wolff <mail@milianw.de>
Sat, 21 Jan 2017 23:56:07 +0000 (00:56 +0100)
src/analyze/gui/histogrammodel.h
src/analyze/gui/parser.cpp
src/analyze/gui/treemodel.h

index d5c4688..33a6d87 100644 (file)
@@ -27,7 +27,7 @@
 struct HistogramColumn
 {
     qint64 allocations;
-    std::shared_ptr<LocationData> location;
+    LocationData::Ptr location;
 };
 Q_DECLARE_TYPEINFO(HistogramColumn, Q_MOVABLE_TYPE);
 
index b4399fc..0f9bdc0 100644 (file)
@@ -81,7 +81,7 @@ struct StringCache
         }
     }
 
-    shared_ptr<LocationData> location(const InstructionPointer& ip) const
+    LocationData::Ptr location(const InstructionPointer& ip) const
     {
         LocationData data = {func(ip), file(ip), module(ip), ip.line};
         auto it = lower_bound(m_locations.begin(), m_locations.end(), data);
@@ -102,7 +102,7 @@ struct StringCache
 
     vector<QString> m_strings;
     mutable QHash<uint64_t, QString> m_ipAddresses;
-    mutable vector<shared_ptr<LocationData>> m_locations;
+    mutable vector<LocationData::Ptr> m_locations;
 
     bool diffMode = false;
 };
@@ -326,7 +326,7 @@ QPair<TreeData, CallerCalleeRows> mergeAllocations(const ParserData& data)
 
             if (!recursionGuard.contains(trace.ipIndex)) { // aggregate caller-callee data
                 auto it = lower_bound(callerCalleeRows.begin(), callerCalleeRows.end(), location,
-                                      [] (const CallerCalleeData& lhs, const std::shared_ptr<LocationData>& rhs) {
+                                      [] (const CallerCalleeData& lhs, const LocationData::Ptr& rhs) {
                     return lhs.location < rhs;
                 });
                 if (it == callerCalleeRows.end() || it->location != location) {
@@ -415,9 +415,9 @@ QVector<RowData> toTopDownData(const QVector<RowData>& bottomUpData)
 
 struct MergedHistogramColumnData
 {
-    std::shared_ptr<LocationData> location;
+    LocationData::Ptr location;
     int64_t allocations;
-    bool operator<(const std::shared_ptr<LocationData>& rhs) const
+    bool operator<(const LocationData::Ptr& rhs) const
     {
         return location < rhs;
     }
index 0df38dd..fe2762f 100644 (file)
@@ -35,7 +35,7 @@ struct RowData
     LocationData::Ptr location;
     const RowData* parent;
     QVector<RowData> children;
-    bool operator<(const std::shared_ptr<LocationData>& rhs) const
+    bool operator<(const LocationData::Ptr& rhs) const
     {
         return *location < *rhs;
     }