MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Compare

Method Compare

Source/Utility/Profiler.cpp:72–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 u32 GetHash() const { return mHash; }
71
72 s32 Compare( const CProfileCallstack & rhs ) const
73 {
74 u32 i;
75 for( i = 0; i < mItems.size() && i < rhs.mItems.size(); ++i )
76 {
77 s32 compare = _strcmpi( mItems[ i ]->GetName(), rhs.mItems[ i ]->GetName() );
78 if( compare != 0 )
79 {
80 return compare;
81 }
82 }
83
84 //
85 // If both stacks are equal to this point and there are no more entries,
86 // they must be identical.
87 //
88 if( i >= mItems.size() && i >= rhs.mItems.size() )
89 return 0;
90
91 return i >= mItems.size() ? 1 : -1;
92 }
93
94 inline const CProfileCallstack * GetParent() const { return mParent; }
95 void Reset();

Callers 1

operator()Method · 0.45

Calls 2

sizeMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected