From 18452fdf1eb3b4c39208ddcfc6c45aa0659a1003 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Fri, 9 Jul 2021 00:30:07 -0700 Subject: [PATCH] :racehorse: noexcept --- include/str_intrusion.h | 4 ++-- src/str_intrusion.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/str_intrusion.h b/include/str_intrusion.h index d4f895e..7fd008f 100644 --- a/include/str_intrusion.h +++ b/include/str_intrusion.h @@ -4,6 +4,6 @@ struct StrFromSV_Wrapper { std::string str; - StrFromSV_Wrapper(std::string_view sv); - ~StrFromSV_Wrapper(); + StrFromSV_Wrapper(std::string_view sv) noexcept; + ~StrFromSV_Wrapper() noexcept; }; \ No newline at end of file diff --git a/src/str_intrusion.cpp b/src/str_intrusion.cpp index 21c0df8..62fbbd6 100644 --- a/src/str_intrusion.cpp +++ b/src/str_intrusion.cpp @@ -32,12 +32,12 @@ struct string_data }; template class rob; -StrFromSV_Wrapper::StrFromSV_Wrapper(std::string_view sv) +StrFromSV_Wrapper::StrFromSV_Wrapper(std::string_view sv) noexcept { (str.*result::ptr)((char *)sv.data()); (str.*result::ptr)(sv.size()); } -StrFromSV_Wrapper::~StrFromSV_Wrapper() +StrFromSV_Wrapper::~StrFromSV_Wrapper() noexcept { (str.*result::ptr)(nullptr); (str.*result::ptr)(0);