🔇 suppress more Clang-Tidy warnings
This commit is contained in:
parent
dcce56d925
commit
6266a55485
@ -14,6 +14,7 @@ Checks: '*,
|
|||||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||||
-cppcoreguidelines-pro-type-union-access,
|
-cppcoreguidelines-pro-type-union-access,
|
||||||
|
-cppcoreguidelines-virtual-class-destructor,
|
||||||
-fuchsia-default-arguments-calls,
|
-fuchsia-default-arguments-calls,
|
||||||
-fuchsia-default-arguments-declarations,
|
-fuchsia-default-arguments-declarations,
|
||||||
-fuchsia-overloaded-operator,
|
-fuchsia-overloaded-operator,
|
||||||
|
|||||||
@ -60,7 +60,7 @@ class exception : public std::exception
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
JSON_HEDLEY_NON_NULL(3)
|
JSON_HEDLEY_NON_NULL(3)
|
||||||
exception(int id_, const char* what_arg) : id(id_), m(what_arg) {}
|
exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing)
|
||||||
|
|
||||||
static std::string name(const std::string& ename, int id_)
|
static std::string name(const std::string& ename, int id_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,7 +36,7 @@ This class implements a both iterators (iterator and const_iterator) for the
|
|||||||
iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)
|
iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)
|
||||||
*/
|
*/
|
||||||
template<typename BasicJsonType>
|
template<typename BasicJsonType>
|
||||||
class iter_impl
|
class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
|
||||||
{
|
{
|
||||||
/// the iterator with BasicJsonType of different const-ness
|
/// the iterator with BasicJsonType of different const-ness
|
||||||
using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;
|
using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;
|
||||||
|
|||||||
@ -502,7 +502,7 @@ class serializer
|
|||||||
case error_handler_t::strict:
|
case error_handler_t::strict:
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << byte;
|
ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (byte | 0);
|
||||||
JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str(), BasicJsonType()));
|
JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str(), BasicJsonType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ class serializer
|
|||||||
case error_handler_t::strict:
|
case error_handler_t::strict:
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << s.back();
|
ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (static_cast<std::uint8_t>(s.back()) | 0);
|
||||||
JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str(), BasicJsonType()));
|
JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str(), BasicJsonType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2776,7 +2776,7 @@ class exception : public std::exception
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
JSON_HEDLEY_NON_NULL(3)
|
JSON_HEDLEY_NON_NULL(3)
|
||||||
exception(int id_, const char* what_arg) : id(id_), m(what_arg) {}
|
exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing)
|
||||||
|
|
||||||
static std::string name(const std::string& ename, int id_)
|
static std::string name(const std::string& ename, int id_)
|
||||||
{
|
{
|
||||||
@ -11621,7 +11621,7 @@ This class implements a both iterators (iterator and const_iterator) for the
|
|||||||
iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)
|
iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)
|
||||||
*/
|
*/
|
||||||
template<typename BasicJsonType>
|
template<typename BasicJsonType>
|
||||||
class iter_impl
|
class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
|
||||||
{
|
{
|
||||||
/// the iterator with BasicJsonType of different const-ness
|
/// the iterator with BasicJsonType of different const-ness
|
||||||
using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;
|
using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;
|
||||||
@ -16926,7 +16926,7 @@ class serializer
|
|||||||
case error_handler_t::strict:
|
case error_handler_t::strict:
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << byte;
|
ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (byte | 0);
|
||||||
JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str(), BasicJsonType()));
|
JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str(), BasicJsonType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17020,7 +17020,7 @@ class serializer
|
|||||||
case error_handler_t::strict:
|
case error_handler_t::strict:
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << s.back();
|
ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (static_cast<std::uint8_t>(s.back()) | 0);
|
||||||
JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str(), BasicJsonType()));
|
JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str(), BasicJsonType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user