Commit 1c3197b8 authored by Victor Zverovich's avatar Victor Zverovich

Fix warnings

parent fd2292f1
......@@ -766,7 +766,7 @@ template <typename Context> struct arg_mapper {
return val;
}
FMT_CONSTEXPR double map(float val) { return val; }
FMT_CONSTEXPR double map(float val) { return static_cast<double>(val); }
FMT_CONSTEXPR double map(double val) { return val; }
FMT_CONSTEXPR long double map(long double val) { return val; }
......
......@@ -218,6 +218,9 @@ FMT_FUNC Char internal::thousands_sep_impl(locale_ref) {
}
#endif
FMT_FUNC format_error::~format_error() FMT_NOEXCEPT {}
FMT_FUNC system_error::~system_error() FMT_NOEXCEPT {}
FMT_FUNC void system_error::init(int err_code, string_view format_str,
format_args args) {
error_code_ = err_code;
......
......@@ -73,10 +73,6 @@
# pragma GCC diagnostic ignored "-Wshadow"
#endif
#if FMT_CLANG_VERSION
# pragma GCC diagnostic ignored "-Wgnu-string-literal-operator-template"
#endif
#ifdef _SECURE_SCL
# define FMT_SECURE_SCL _SECURE_SCL
#else
......@@ -299,9 +295,9 @@ using wwriter = basic_writer<back_insert_range<internal::buffer<wchar_t>>>;
class format_error : public std::runtime_error {
public:
explicit format_error(const char* message) : std::runtime_error(message) {}
explicit format_error(const std::string& message)
: std::runtime_error(message) {}
~format_error() FMT_NOEXCEPT;
};
namespace internal {
......@@ -2274,6 +2270,7 @@ class system_error : public std::runtime_error {
: std::runtime_error("") {
init(error_code, message, make_format_args(args...));
}
~system_error() FMT_NOEXCEPT;
int error_code() const { return error_code_; }
};
......@@ -3555,10 +3552,15 @@ template <typename Char> struct udl_arg {
inline namespace literals {
# if FMT_USE_UDL_TEMPLATE
# pragma GCC diagnostic push
# if FMT_CLANG_VERSION
# pragma GCC diagnostic ignored "-Wgnu-string-literal-operator-template"
# endif
template <typename Char, Char... CHARS>
FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {
return {};
}
# pragma GCC diagnostic pop
# else
/**
\rst
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment