浏览代码

LibSymbolication: Make Symbol comparable

All its members are comparable themselves, so this can be defaulted.
Making it comparable will allow us, among other things, to check if a
list of symbols (i.e., the result of calling the symbolicate functions)
is equal or not to another, which in turn will allow us to avoid
refreshing the SystemMonitor's Stack tab when successive symbolicated
stacks are the same.
Rodrigo Tobar 3 年之前
父节点
当前提交
9199f0836a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Libraries/LibSymbolication/Symbolication.h

+ 1 - 0
Userland/Libraries/LibSymbolication/Symbolication.h

@@ -17,6 +17,7 @@ struct Symbol {
     String object {};
     u32 offset { 0 };
     Vector<Debug::DebugInfo::SourcePosition> source_positions;
+    bool operator==(Symbol const&) const = default;
 };
 
 Optional<FlatPtr> kernel_base();