Skip to content

Commit 92822ec

Browse files
author
Rafał Hibner
committed
Update JSONResponse.cpp
1 parent 511257a commit 92822ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/JSONResponse.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct ResponseHandler : rapidjson::BaseReaderHandler<rapidjson::UTF8<>, Respons
131131
{
132132
if (i > static_cast<unsigned int>(std::numeric_limits<int>::max()))
133133
{
134-
return Double(i);
134+
return Double(static_cast<double>(i));
135135
// https://spec.graphql.org/October2021/#sec-Int
136136
//throw std::overflow_error("GraphQL only supports 32-bit signed integers");
137137
}
@@ -140,14 +140,14 @@ struct ResponseHandler : rapidjson::BaseReaderHandler<rapidjson::UTF8<>, Respons
140140

141141
bool Int64(int64_t i)
142142
{
143-
return Double(i);
143+
return Double(static_cast<double>(i));
144144
// https://spec.graphql.org/October2021/#sec-Int
145145
//throw std::overflow_error("GraphQL only supports 32-bit signed integers");
146146
}
147147

148148
bool Uint64(uint64_t i)
149149
{
150-
return Double(i);
150+
return Double(static_cast<double>(i));
151151
// https://spec.graphql.org/October2021/#sec-Int
152152
//throw std::overflow_error("GraphQL only supports 32-bit signed integers");
153153
}

0 commit comments

Comments
 (0)