Try to fix compiling on GCC
This commit is contained in:
parent
942894b6db
commit
e5bba4ea36
|
@ -7,5 +7,5 @@ namespace html {
|
||||||
|
|
||||||
std::string escape(const std::string& in);
|
std::string escape(const std::string& in);
|
||||||
|
|
||||||
}; // namespace html
|
} // namespace html
|
||||||
}; // namespace blankie
|
} // namespace blankie
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct Url {
|
||||||
|
|
||||||
Url(const std::string& str);
|
Url(const std::string& str);
|
||||||
|
|
||||||
constexpr std::string get_origin() const {
|
inline std::string get_origin() const {
|
||||||
std::string res;
|
std::string res;
|
||||||
if (!this->scheme.empty()) {
|
if (!this->scheme.empty()) {
|
||||||
res = this->scheme + "://";
|
res = this->scheme + "://";
|
||||||
|
@ -40,5 +40,5 @@ struct Url {
|
||||||
|
|
||||||
std::string normalize_path(const std::string& str);
|
std::string normalize_path(const std::string& str);
|
||||||
|
|
||||||
}; // namespace murl
|
} // namespace murl
|
||||||
}; // namespace blankie
|
} // namespace blankie
|
||||||
|
|
|
@ -26,5 +26,5 @@ struct Element {
|
||||||
std::string serialize() const;
|
std::string serialize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // namespace html
|
} // namespace html
|
||||||
}; // namespace blankie
|
} // namespace blankie
|
||||||
|
|
6
file.h
6
file.h
|
@ -13,12 +13,12 @@ public:
|
||||||
File(const File&) = delete;
|
File(const File&) = delete;
|
||||||
File& operator=(const File&) = delete;
|
File& operator=(const File&) = delete;
|
||||||
|
|
||||||
inline constexpr File(File&& other) {
|
inline File(File&& other) {
|
||||||
try_close(this->_file);
|
try_close(this->_file);
|
||||||
this->_file = other._file;
|
this->_file = other._file;
|
||||||
other._file = nullptr;
|
other._file = nullptr;
|
||||||
}
|
}
|
||||||
inline constexpr File& operator=(File&& other) {
|
inline File& operator=(File&& other) {
|
||||||
if (this == &other) {
|
if (this == &other) {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
||||||
throw_system_error("fwrite()");
|
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());
|
this->write(str.data(), str.size());
|
||||||
}
|
}
|
||||||
inline constexpr FILE* get() const noexcept {
|
inline constexpr FILE* get() const noexcept {
|
||||||
|
|
Loading…
Reference in New Issue