aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui')
-rw-r--r--include/cru/ui/ThemeManager.h2
-rw-r--r--include/cru/ui/ThemeResourceDictionary.h4
-rw-r--r--include/cru/ui/mapper/Mapper.h6
3 files changed, 6 insertions, 6 deletions
diff --git a/include/cru/ui/ThemeManager.h b/include/cru/ui/ThemeManager.h
index f3f01313..72ade899 100644
--- a/include/cru/ui/ThemeManager.h
+++ b/include/cru/ui/ThemeManager.h
@@ -35,7 +35,7 @@ class CRU_UI_API ThemeManager : public Object {
}
}
throw ThemeResourceKeyNotExistException(
- Format(u"Theme resource key {} not exist.", key));
+ std::format("Theme resource key {} not exist.", key.ToUtf8()));
}
String GetResourceString(const String& key);
diff --git a/include/cru/ui/ThemeResourceDictionary.h b/include/cru/ui/ThemeResourceDictionary.h
index 2ddb4a90..0cbda01b 100644
--- a/include/cru/ui/ThemeResourceDictionary.h
+++ b/include/cru/ui/ThemeResourceDictionary.h
@@ -2,13 +2,13 @@
#include "Base.h"
#include "cru/base/Base.h"
-#include "cru/base/Format.h"
#include "cru/xml/XmlNode.h"
#include "mapper/MapperRegistry.h"
#include "style/StyleRuleSet.h"
#include <any>
#include <filesystem>
+#include <format>
#include <typeindex>
#include <typeinfo>
@@ -48,7 +48,7 @@ class CRU_UI_API ThemeResourceDictionary : public Object {
auto find_result = resource_map_.find(key);
if (find_result == resource_map_.cend()) {
throw ThemeResourceKeyNotExistException(
- Format(u"Theme resource key {} not exist.", key));
+ std::format("Theme resource key {} not exist.", key.ToUtf8()));
}
auto& cache = find_result->second.cache;
diff --git a/include/cru/ui/mapper/Mapper.h b/include/cru/ui/mapper/Mapper.h
index 40e15186..d391fac3 100644
--- a/include/cru/ui/mapper/Mapper.h
+++ b/include/cru/ui/mapper/Mapper.h
@@ -66,7 +66,7 @@ class CRU_UI_API BasicMapper : public MapperBase {
virtual T MapFromString(String str) {
if (!SupportMapFromString()) {
- throw Exception(u"This mapper does not support map from string.");
+ throw Exception("This mapper does not support map from string.");
}
return DoMapFromString(str);
@@ -74,11 +74,11 @@ class CRU_UI_API BasicMapper : public MapperBase {
T MapFromXml(xml::XmlElementNode* node) {
if (!SupportMapFromXml()) {
- throw Exception(u"This mapper does not support map from xml.");
+ throw Exception("This mapper does not support map from xml.");
}
if (!XmlElementIsOfThisType(node)) {
- throw Exception(u"This xml element is not of mapping type.");
+ throw Exception("This xml element is not of mapping type.");
}
return DoMapFromXml(node);