瀏覽代碼

cmListFileBacktrace: Remove unused "Depth" method

Brad King 3 年之前
父節點
當前提交
d0ceb409ff
共有 2 個文件被更改,包括 0 次插入15 次删除
  1. 0 11
      Source/cmListFileCache.cxx
  2. 0 4
      Source/cmListFileCache.h

+ 0 - 11
Source/cmListFileCache.cxx

@@ -497,17 +497,6 @@ cmListFileContext const& cmListFileBacktrace::Top() const
   return this->TopEntry->Context;
 }
 
-size_t cmListFileBacktrace::Depth() const
-{
-  size_t depth = 0;
-  if (Entry const* cur = this->TopEntry.get()) {
-    for (; cur; cur = cur->Parent.get()) {
-      ++depth;
-    }
-  }
-  return depth;
-}
-
 bool cmListFileBacktrace::Empty() const
 {
   return !this->TopEntry;

+ 0 - 4
Source/cmListFileCache.h

@@ -4,7 +4,6 @@
 
 #include "cmConfigure.h" // IWYU pragma: keep
 
-#include <cstddef>
 #include <iosfwd>
 #include <memory>
 #include <string>
@@ -180,9 +179,6 @@ public:
   // This may be called only if Empty() would return false.
   cmListFileContext const& Top() const;
 
-  // Get the number of 'frames' in this backtrace
-  size_t Depth() const;
-
   // Return true if this backtrace is empty.
   bool Empty() const;