未验证 提交 68433bf3 编写于 作者: M Mikhail Korotov 提交者: GitHub

Update ReadHelpers.h

上级 f0dc8043
......@@ -253,14 +253,12 @@ inline void readBoolTextWord(bool & x, ReadBuffer & buf)
template <typename T, typename ReturnType = void>
ReturnType readIntTextImpl(T & x, ReadBuffer & buf)
{
std::cerr << "\n\nEnter in readIntTextImpl function\n\n";
static constexpr bool throw_exception = std::is_same_v<ReturnType, void>;
bool negative = false;
std::make_unsigned_t<T> res = 0;
if (buf.eof())
{
std::cerr << "\n\nbuf.eof\n\n";
if constexpr (throw_exception)
throwReadAfterEOF();
else
......@@ -269,7 +267,6 @@ ReturnType readIntTextImpl(T & x, ReadBuffer & buf)
while (!buf.eof())
{
std::cerr << "\n\nDo\n\n";
switch (*buf.position())
{
case '+':
......@@ -312,7 +309,6 @@ ReturnType readIntTextImpl(T & x, ReadBuffer & buf)
template <typename T>
void completeReadIntTextImpl(T & x, ReadBuffer & buf)
{
std::cerr << "\n\nEnter in exactReadIntTextImpl function\n\n";
readIntTextImpl<T, void>(x, buf);
if (!buf.eof())
throw Exception("Invalid characters used", ErrorCodes::CANNOT_PARSE_NUMBER);
......@@ -321,7 +317,6 @@ void completeReadIntTextImpl(T & x, ReadBuffer & buf)
template <typename T>
void readIntText(T & x, ReadBuffer & buf)
{
std::cerr << "\n\nEnter in readIntText function\n\n";
readIntTextImpl<T, void>(x, buf);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册