Fix error: use of old-style cast

This commit is contained in:
Vitaly Baranov 2019-04-27 00:58:14 +03:00
parent 12d8dbeaed
commit 14d58737dd
2 changed files with 11 additions and 2 deletions

View File

@ -163,7 +163,7 @@ public:
if (which.isFloat()) if (which.isFloat())
{ {
if (pjh.is_integer()) if (pjh.is_integer())
return {(double)pjh.get_integer()}; return {static_cast<double>(pjh.get_integer())};
else if (pjh.is_double()) else if (pjh.is_double())
return {pjh.get_double()}; return {pjh.get_double()};
else else

View File

@ -5,9 +5,18 @@
#include <DataTypes/DataTypeFactory.h> #include <DataTypes/DataTypeFactory.h>
#include <Functions/IFunction.h> #include <Functions/IFunction.h>
#include <Common/typeid_cast.h> #include <Common/typeid_cast.h>
#include <ext/range.h>
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#endif
#include <simdjson/jsonparser.h> #include <simdjson/jsonparser.h>
#include <ext/range.h>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace DB namespace DB