diff options
Diffstat (limited to 'src/ui/mapper')
| -rw-r--r-- | src/ui/mapper/ColorMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/CursorMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/MapperRegistry.cpp | 4 | ||||
| -rw-r--r-- | src/ui/mapper/PointMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/SizeMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/ThicknessMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/CheckedConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/ClickStateConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/FocusConditionMapper.cpp | 4 | ||||
| -rw-r--r-- | src/ui/mapper/style/HoverConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/StyleRuleMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/StyleRuleSetMapper.cpp | 2 | 
12 files changed, 14 insertions, 14 deletions
| diff --git a/src/ui/mapper/ColorMapper.cpp b/src/ui/mapper/ColorMapper.cpp index 6f7de7fb..72ea1ce2 100644 --- a/src/ui/mapper/ColorMapper.cpp +++ b/src/ui/mapper/ColorMapper.cpp @@ -8,7 +8,7 @@ bool ColorMapper::XmlElementIsOfThisType(xml::XmlElementNode* node) {  Color ColorMapper::DoMapFromString(String str) {    auto c = Color::Parse(str);    if (!c) { -    throw Exception(u"Invalid color value."); +    throw Exception("Invalid color value.");    }    return *c;  } diff --git a/src/ui/mapper/CursorMapper.cpp b/src/ui/mapper/CursorMapper.cpp index ed3c91ec..4f59439f 100644 --- a/src/ui/mapper/CursorMapper.cpp +++ b/src/ui/mapper/CursorMapper.cpp @@ -24,7 +24,7 @@ std::shared_ptr<ICursor> CursorMapper::DoMapFromString(String str) {    } else if (str.CaseInsensitiveCompare(u"ibeam") == 0) {      return cursor_manager->GetSystemCursor(SystemCursorType::IBeam);    } else { -    throw Exception(u"Unsupported cursor type."); +    throw Exception("Unsupported cursor type.");    }  } diff --git a/src/ui/mapper/MapperRegistry.cpp b/src/ui/mapper/MapperRegistry.cpp index a542bfca..d877f14a 100644 --- a/src/ui/mapper/MapperRegistry.cpp +++ b/src/ui/mapper/MapperRegistry.cpp @@ -74,7 +74,7 @@ MapperRegistry::~MapperRegistry() {  void MapperRegistry::RegisterMapper(MapperBase *mapper) {    if (std::find(mapper_list_.cbegin(), mapper_list_.cend(), mapper) !=        mapper_list_.cend()) { -    throw Exception(u"This mapper is already registered."); +    throw Exception("This mapper is already registered.");    }    mapper_list_.push_back(mapper); @@ -83,7 +83,7 @@ void MapperRegistry::RegisterMapper(MapperBase *mapper) {  void MapperRegistry::UnregisterMapper(MapperBase *mapper) {    auto it = std::find(mapper_list_.begin(), mapper_list_.end(), mapper);    if (it == mapper_list_.end()) { -    throw Exception(u"This mapper is not registered."); +    throw Exception("This mapper is not registered.");    }    mapper_list_.erase(it); diff --git a/src/ui/mapper/PointMapper.cpp b/src/ui/mapper/PointMapper.cpp index 4b0104d0..1bf7defb 100644 --- a/src/ui/mapper/PointMapper.cpp +++ b/src/ui/mapper/PointMapper.cpp @@ -12,7 +12,7 @@ Point PointMapper::DoMapFromString(String str) {    } else if (values.size() == 1) {      return {values[0], values[0]};    } else { -    throw Exception(u"Invalid Point string."); +    throw Exception("Invalid Point string.");    }  } diff --git a/src/ui/mapper/SizeMapper.cpp b/src/ui/mapper/SizeMapper.cpp index 4cbe2d38..7e1bbd91 100644 --- a/src/ui/mapper/SizeMapper.cpp +++ b/src/ui/mapper/SizeMapper.cpp @@ -12,7 +12,7 @@ Size SizeMapper::DoMapFromString(String str) {    } else if (values.size() == 1) {      return {values[0], values[0]};    } else { -    throw Exception(u"Invalid Point string."); +    throw Exception("Invalid Point string.");    }  } diff --git a/src/ui/mapper/ThicknessMapper.cpp b/src/ui/mapper/ThicknessMapper.cpp index 23be89b4..eed7c651 100644 --- a/src/ui/mapper/ThicknessMapper.cpp +++ b/src/ui/mapper/ThicknessMapper.cpp @@ -15,7 +15,7 @@ Thickness ThicknessMapper::DoMapFromString(String str) {    } else if (values.size() == 1) {      return Thickness(values[0], values[0], values[0], values[0]);    } else { -    throw Exception(u"Invalid Thickness string."); +    throw Exception("Invalid Thickness string.");    }  } diff --git a/src/ui/mapper/style/CheckedConditionMapper.cpp b/src/ui/mapper/style/CheckedConditionMapper.cpp index 74e0a3c5..e33c1113 100644 --- a/src/ui/mapper/style/CheckedConditionMapper.cpp +++ b/src/ui/mapper/style/CheckedConditionMapper.cpp @@ -16,7 +16,7 @@ ClonablePtr<ui::style::CheckedCondition> CheckedConditionMapper::DoMapFromXml(    } else if (value.CaseInsensitiveEqual(u"false")) {      return ui::style::CheckedCondition::Create(false);    } else { -    throw Exception(u"Invalid value for CheckedCondition: " + value); +    throw Exception("Invalid value for CheckedCondition: " + value.ToUtf8());    }  }  }  // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/ClickStateConditionMapper.cpp b/src/ui/mapper/style/ClickStateConditionMapper.cpp index d6b403c9..ca1f09c6 100644 --- a/src/ui/mapper/style/ClickStateConditionMapper.cpp +++ b/src/ui/mapper/style/ClickStateConditionMapper.cpp @@ -24,7 +24,7 @@ ClickStateConditionMapper::DoMapFromXml(xml::XmlElementNode *node) {      } else if (value_attr->CaseInsensitiveEqual(u"pressinactive")) {        state = helper::ClickState::PressInactive;      } else { -      throw Exception(u"Unknown click state: " + *value_attr); +      throw Exception("Unknown click state: " + value_attr->ToUtf8());      }    } diff --git a/src/ui/mapper/style/FocusConditionMapper.cpp b/src/ui/mapper/style/FocusConditionMapper.cpp index dfefb921..9aa1d6ce 100644 --- a/src/ui/mapper/style/FocusConditionMapper.cpp +++ b/src/ui/mapper/style/FocusConditionMapper.cpp @@ -1,5 +1,5 @@ -#include "cru/base/ClonablePtr.h"  #include "cru/ui/mapper/style/FocusConditionMapper.h" +#include "cru/base/ClonablePtr.h"  #include "cru/ui/style/Condition.h"  #include "cru/xml/XmlNode.h" @@ -16,7 +16,7 @@ ClonablePtr<ui::style::FocusCondition> FocusConditionMapper::DoMapFromXml(    } else if (value.CaseInsensitiveEqual(u"false")) {      return ui::style::FocusCondition::Create(false);    } else { -    throw Exception(u"Invalid value for FocusCondition: " + value); +    throw Exception("Invalid value for FocusCondition: " + value.ToUtf8());    }  }  }  // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/HoverConditionMapper.cpp b/src/ui/mapper/style/HoverConditionMapper.cpp index 0110edd9..27565192 100644 --- a/src/ui/mapper/style/HoverConditionMapper.cpp +++ b/src/ui/mapper/style/HoverConditionMapper.cpp @@ -17,7 +17,7 @@ ClonablePtr<HoverCondition> HoverConditionMapper::DoMapFromXml(    } else if (value.CaseInsensitiveEqual(u"false")) {      return ui::style::HoverCondition::Create(false);    } else { -    throw Exception(u"Invalid value for HoverCondition: " + value); +    throw Exception("Invalid value for HoverCondition: " + value.ToUtf8());    }  }  }  // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/StyleRuleMapper.cpp b/src/ui/mapper/style/StyleRuleMapper.cpp index 2eb5b0a2..f80d27db 100644 --- a/src/ui/mapper/style/StyleRuleMapper.cpp +++ b/src/ui/mapper/style/StyleRuleMapper.cpp @@ -49,7 +49,7 @@ ClonablePtr<ui::style::StyleRule> StyleRuleMapper::DoMapFromXml(        }        if (!resolved) { -        throw Exception(u"Unknown element in StyleRule: " + c->GetTag()); +        throw Exception("Unknown element in StyleRule: " + c->GetTag().ToUtf8());        }      }    } diff --git a/src/ui/mapper/style/StyleRuleSetMapper.cpp b/src/ui/mapper/style/StyleRuleSetMapper.cpp index d014edc7..1067f8f8 100644 --- a/src/ui/mapper/style/StyleRuleSetMapper.cpp +++ b/src/ui/mapper/style/StyleRuleSetMapper.cpp @@ -25,7 +25,7 @@ std::shared_ptr<ui::style::StyleRuleSet> StyleRuleSetMapper::DoMapFromXml(          auto style_rule = style_rule_mapper->MapFromXml(c);          result->AddStyleRule(*style_rule);        } else { -        throw Exception(u"StyleRuleSet can only contain StyleRule."); +        throw Exception("StyleRuleSet can only contain StyleRule.");        }      }    } | 
