aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-04 00:24:32 +0800
committercrupest <crupest@outlook.com>2020-03-04 00:24:32 +0800
commit79ba10135987cffc31496e8515c5372146d9b31d (patch)
tree47c566457e2ac1a751be2b00b23d093849550f05 /src/ui
parent280a621dd8189ca3f6dcf895fdca9563cdd79364 (diff)
downloadcru-79ba10135987cffc31496e8515c5372146d9b31d.tar.gz
cru-79ba10135987cffc31496e8515c5372146d9b31d.tar.bz2
cru-79ba10135987cffc31496e8515c5372146d9b31d.zip
...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/routed_event_dispatch.hpp2
-rw-r--r--src/ui/window.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/routed_event_dispatch.hpp b/src/ui/routed_event_dispatch.hpp
index 0e60e492..dd55ce17 100644
--- a/src/ui/routed_event_dispatch.hpp
+++ b/src/ui/routed_event_dispatch.hpp
@@ -20,7 +20,7 @@ namespace cru::ui {
// "original_sender", which is unchanged. And "args" will be perfectly forwarded
// as the rest arguments.
template <typename EventArgs, typename... Args>
-void DispatchEvent(const char* event_name,
+void DispatchEvent(const std::string_view& event_name,
Control* const original_sender,
event::RoutedEvent<EventArgs>* (Control::*event_ptr)(),
Control* const last_receiver, Args&&... args) {
diff --git a/src/ui/window.cpp b/src/ui/window.cpp
index 7579786a..bf2e24ca 100644
--- a/src/ui/window.cpp
+++ b/src/ui/window.cpp
@@ -20,7 +20,7 @@ namespace event_names {
#ifdef CRU_DEBUG
#define CRU_DEFINE_EVENT_NAME(name) constexpr const char* name = #name;
#else
-#define CRU_DEFINE_EVENT_NAME(name) constexpr const char* name = nullptr;
+#define CRU_DEFINE_EVENT_NAME(name) constexpr const char* name = "";
#endif
CRU_DEFINE_EVENT_NAME(LoseFocus)