From: Milian Wolff Date: Sat, 21 Jan 2017 22:48:46 +0000 (+0100) Subject: Use new LocationData::Ptr typedef everywhere X-Git-Tag: submit/tizen/20180620.112952^2~138 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de6f4524582b531e182ed0d36d15cf9b573123c4;p=sdk%2Ftools%2Fheaptrack.git Use new LocationData::Ptr typedef everywhere --- diff --git a/src/analyze/gui/histogrammodel.h b/src/analyze/gui/histogrammodel.h index d5c4688..33a6d87 100644 --- a/src/analyze/gui/histogrammodel.h +++ b/src/analyze/gui/histogrammodel.h @@ -27,7 +27,7 @@ struct HistogramColumn { qint64 allocations; - std::shared_ptr location; + LocationData::Ptr location; }; Q_DECLARE_TYPEINFO(HistogramColumn, Q_MOVABLE_TYPE); diff --git a/src/analyze/gui/parser.cpp b/src/analyze/gui/parser.cpp index b4399fc..0f9bdc0 100644 --- a/src/analyze/gui/parser.cpp +++ b/src/analyze/gui/parser.cpp @@ -81,7 +81,7 @@ struct StringCache } } - shared_ptr 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 m_strings; mutable QHash m_ipAddresses; - mutable vector> m_locations; + mutable vector m_locations; bool diffMode = false; }; @@ -326,7 +326,7 @@ QPair 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& rhs) { + [] (const CallerCalleeData& lhs, const LocationData::Ptr& rhs) { return lhs.location < rhs; }); if (it == callerCalleeRows.end() || it->location != location) { @@ -415,9 +415,9 @@ QVector toTopDownData(const QVector& bottomUpData) struct MergedHistogramColumnData { - std::shared_ptr location; + LocationData::Ptr location; int64_t allocations; - bool operator<(const std::shared_ptr& rhs) const + bool operator<(const LocationData::Ptr& rhs) const { return location < rhs; } diff --git a/src/analyze/gui/treemodel.h b/src/analyze/gui/treemodel.h index 0df38dd..fe2762f 100644 --- a/src/analyze/gui/treemodel.h +++ b/src/analyze/gui/treemodel.h @@ -35,7 +35,7 @@ struct RowData LocationData::Ptr location; const RowData* parent; QVector children; - bool operator<(const std::shared_ptr& rhs) const + bool operator<(const LocationData::Ptr& rhs) const { return *location < *rhs; }