Try to fix compiling on GCC

This commit is contained in:
blankie 2023-04-10 21:06:27 +07:00
parent 942894b6db
commit e5bba4ea36
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
4 changed files with 10 additions and 10 deletions

View File

@ -7,5 +7,5 @@ namespace html {
std::string escape(const std::string& in);
}; // namespace html
}; // namespace blankie
} // namespace html
} // namespace blankie

View File

@ -19,7 +19,7 @@ struct Url {
Url(const std::string& str);
constexpr std::string get_origin() const {
inline std::string get_origin() const {
std::string res;
if (!this->scheme.empty()) {
res = this->scheme + "://";
@ -40,5 +40,5 @@ struct Url {
std::string normalize_path(const std::string& str);
}; // namespace murl
}; // namespace blankie
} // namespace murl
} // namespace blankie

View File

@ -26,5 +26,5 @@ struct Element {
std::string serialize() const;
};
}; // namespace html
}; // namespace blankie
} // namespace html
} // namespace blankie

6
file.h
View File

@ -13,12 +13,12 @@ public:
File(const File&) = delete;
File& operator=(const File&) = delete;
inline constexpr File(File&& other) {
inline File(File&& other) {
try_close(this->_file);
this->_file = other._file;
other._file = nullptr;
}
inline constexpr File& operator=(File&& other) {
inline File& operator=(File&& other) {
if (this == &other) {
return *this;
}
@ -47,7 +47,7 @@ public:
throw_system_error("fwrite()");
}
}
inline constexpr void write(const std::string& str) {
inline void write(const std::string& str) {
this->write(str.data(), str.size());
}
inline constexpr FILE* get() const noexcept {