Skip to content

Commit af8cbc9

Browse files
vkconfig: Fix layer init
1 parent 8d929aa commit af8cbc9

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

vkconfig_core/layer_manager.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,14 @@ static std::vector<Path> GetImplicitLayerPaths() {
5959
LoadRegistrySystemLayers("HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Class\\...\\VulkanImplicitLayers");
6060
result.insert(result.begin(), drivers_registry_paths.begin(), drivers_registry_paths.end());
6161
#else
62-
std::vector<std::string> paths;
6362
if (VKC_PLATFORM == PLATFORM_MACOS) {
6463
static const char *LAYERS_PATHS[] = {
6564
"/usr/local/share/vulkan/implicit_layer.d",
6665
".local/share/vulkan/implicit_layer.d",
6766
};
6867

6968
for (std::size_t i = 0, n = std::size(LAYERS_PATHS); i < n; ++i) {
70-
paths.push_back(LAYERS_PATHS[i]);
69+
result.push_back(LAYERS_PATHS[i]);
7170
}
7271
} else {
7372
static const char *LAYERS_PATHS[] = {
@@ -87,7 +86,7 @@ static std::vector<Path> GetImplicitLayerPaths() {
8786
};
8887

8988
for (std::size_t i = 0, n = std::size(LAYERS_PATHS); i < n; ++i) {
90-
paths.push_back(LAYERS_PATHS[i]);
89+
result.push_back(LAYERS_PATHS[i]);
9190
}
9291
}
9392
#endif
@@ -112,15 +111,14 @@ std::vector<Path> GetExplicitLayerPaths() {
112111
LoadRegistrySystemLayers("HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Class\\...\\VulkanExplicitLayers");
113112
result.insert(result.begin(), drivers_registry_paths.begin(), drivers_registry_paths.end());
114113
#else
115-
std::vector<std::string> paths;
116114
if (VKC_PLATFORM == PLATFORM_MACOS) {
117115
static const char *LAYERS_PATHS[] = {
118116
"/usr/local/share/vulkan/explicit_layer.d",
119117
".local/share/vulkan/explicit_layer.d",
120118
};
121119

122120
for (std::size_t i = 0, n = std::size(LAYERS_PATHS); i < n; ++i) {
123-
paths.push_back(LAYERS_PATHS[i]);
121+
result.push_back(LAYERS_PATHS[i]);
124122
}
125123
} else {
126124
static const char *LAYERS_PATHS[] = {
@@ -140,7 +138,7 @@ std::vector<Path> GetExplicitLayerPaths() {
140138
};
141139

142140
for (std::size_t i = 0, n = std::size(LAYERS_PATHS); i < n; ++i) {
143-
paths.push_back(LAYERS_PATHS[i]);
141+
result.push_back(LAYERS_PATHS[i]);
144142
}
145143
}
146144
#endif

0 commit comments

Comments
 (0)