فهرست منبع

common: Rename binary_find.h to algorithm.h

Makes the header more general for other potential algorithms in the
future. While we're at it, include a missing <functional> include to
satisfy the use of std::less.
Lioncash 6 سال پیش
والد
کامیت
ac4dbd3b25
4فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 1 1
      src/common/CMakeLists.txt
  2. 1 0
      src/common/algorithm.h
  3. 1 0
      src/video_core/texture_cache/surface_base.cpp
  4. 2 3
      src/video_core/texture_cache/surface_base.h

+ 1 - 1
src/common/CMakeLists.txt

@@ -95,11 +95,11 @@ add_custom_command(OUTPUT scm_rev.cpp
 )
 )
 
 
 add_library(common STATIC
 add_library(common STATIC
+    algorithm.h
     alignment.h
     alignment.h
     assert.h
     assert.h
     detached_tasks.cpp
     detached_tasks.cpp
     detached_tasks.h
     detached_tasks.h
-    binary_find.h
     bit_field.h
     bit_field.h
     bit_util.h
     bit_util.h
     cityhash.cpp
     cityhash.cpp

+ 1 - 0
src/common/binary_find.h → src/common/algorithm.h

@@ -5,6 +5,7 @@
 #pragma once
 #pragma once
 
 
 #include <algorithm>
 #include <algorithm>
+#include <functional>
 
 
 namespace Common {
 namespace Common {
 
 

+ 1 - 0
src/video_core/texture_cache/surface_base.cpp

@@ -2,6 +2,7 @@
 // Licensed under GPLv2 or any later version
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 // Refer to the license.txt file included.
 
 
+#include "common/algorithm.h"
 #include "common/assert.h"
 #include "common/assert.h"
 #include "common/common_types.h"
 #include "common/common_types.h"
 #include "common/microprofile.h"
 #include "common/microprofile.h"

+ 2 - 3
src/video_core/texture_cache/surface_base.h

@@ -4,12 +4,11 @@
 
 
 #pragma once
 #pragma once
 
 
-#include <algorithm>
+#include <optional>
+#include <tuple>
 #include <unordered_map>
 #include <unordered_map>
 #include <vector>
 #include <vector>
 
 
-#include "common/assert.h"
-#include "common/binary_find.h"
 #include "common/common_types.h"
 #include "common/common_types.h"
 #include "video_core/gpu.h"
 #include "video_core/gpu.h"
 #include "video_core/morton.h"
 #include "video_core/morton.h"