1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: Warnings about missing theme/style handlers being printed on launch

This commit is contained in:
WerWolv 2023-11-06 15:15:18 +01:00
parent 94f3664dbc
commit 7efe9acefb
2 changed files with 2 additions and 3 deletions

View File

@ -122,7 +122,7 @@ namespace hex {
}
}
if (theme.contains("colors")) {
if (theme.contains("colors") && !s_themeHandlers.empty()) {
for (const auto&[type, content] : theme["colors"].items()) {
if (!s_themeHandlers.contains(type)) {
log::warn("No theme handler found for '{}'", type);
@ -147,7 +147,7 @@ namespace hex {
}
}
if (theme.contains("styles")) {
if (theme.contains("styles") && !s_styleHandlers.empty()) {
for (const auto&[type, content] : theme["styles"].items()) {
if (!s_styleHandlers.contains(type)) {
log::warn("No style handler found for '{}'", type);

View File

@ -8,7 +8,6 @@
#include <TextEditor.h>
#include <romfs/romfs.hpp>
#include <hex/helpers/utils.hpp>
#include <hex/helpers/fs.hpp>
#include <hex/api/event.hpp>