diff --git a/blankie/escape.cpp b/blankie/escape.cpp index 6013ff1..fe3492a 100644 --- a/blankie/escape.cpp +++ b/blankie/escape.cpp @@ -27,8 +27,8 @@ std::string escape(const std::string& in) { return out; } -}; // namespace html -}; // namespace blankie +} // namespace html +} // namespace blankie static inline const char* get_replacement(char c) { switch (c) { diff --git a/blankie/murl.cpp b/blankie/murl.cpp index 9d8ebc8..0c93405 100644 --- a/blankie/murl.cpp +++ b/blankie/murl.cpp @@ -134,8 +134,8 @@ std::string normalize_path(const std::string& str) { return res; } -}; // namespace murl -}; // namespace blankie +} // namespace murl +} // namespace blankie static void handle_segment(std::vector& segments, const std::string& str, size_t offset, size_t length) { if (length == 2 && str[offset] == '.' && str[offset + 1] == '.') { diff --git a/blankie/serializer.cpp b/blankie/serializer.cpp index 7a6a951..65bbf88 100644 --- a/blankie/serializer.cpp +++ b/blankie/serializer.cpp @@ -48,8 +48,8 @@ std::string Element::serialize() const { return out; } -}; // namespace html -}; // namespace blankie +} // namespace html +} // namespace blankie static inline bool is_autoclosing_tag(const char* tag) { return !strncmp(tag, "link", 5) || !strncmp(tag, "meta", 5) || !strncmp(tag, "img", 4) || !strncmp(tag, "br", 3); diff --git a/pixivclient.h b/pixivclient.h index 23dd385..07ee7cf 100644 --- a/pixivclient.h +++ b/pixivclient.h @@ -25,7 +25,7 @@ public: this->_message = httplib::to_string(error); } - const constexpr char* what() const noexcept { + inline const char* what() const noexcept { return this->_message.c_str(); } @@ -37,7 +37,7 @@ class PixivException : public std::exception { public: PixivException(int status_, std::string message) : status(status_), _message(std::move(message)) {} - const constexpr char* what() const noexcept { + inline const char* what() const noexcept { return this->_message.c_str(); }