瀏覽代碼

UI: Make scene collection/profile enum funcs external

Allows using the functions outside of the file they're in.
jp9000 9 年之前
父節點
當前提交
bfc21317bf
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 1 1
      UI/window-basic-main-profiles.cpp
  2. 3 1
      UI/window-basic-main-scene-collections.cpp

+ 1 - 1
UI/window-basic-main-profiles.cpp

@@ -24,7 +24,7 @@
 #include "window-namedialog.hpp"
 #include "qt-wrappers.hpp"
 
-template <typename Func> static void EnumProfiles(Func &&cb)
+void EnumProfiles(std::function<bool (const char *, const char *)> &&cb)
 {
 	char path[512];
 	os_glob_t *glob;

+ 3 - 1
UI/window-basic-main-scene-collections.cpp

@@ -24,7 +24,9 @@
 #include "window-namedialog.hpp"
 #include "qt-wrappers.hpp"
 
-template <typename Func> static void EnumSceneCollections(Func &&cb)
+using namespace std;
+
+void EnumSceneCollections(std::function<bool (const char *, const char *)> &&cb)
 {
 	char path[512];
 	os_glob_t *glob;