[c++] Cast HexDigit argument to int #954
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix implicit conversion error.
bond/cpp/inc/bond/protocol/simple_json_writer.h:201:39: error: call of overloaded ‘HexDigit(unsigned int)’ is ambiguous
u[5] = detail::HexDigit(c >> 0);
^
In file included from bond/cpp/inc/bond/protocol/compact_binary.h:9:0,
from bond/cpp/inc/bond/core/detail/marshaled_bonded.h:8,
from bond/cpp/inc/bond/core/bonded.h:10,
from bond/cpp/inc/bond/core/apply.h:8,
from bond/cpp/inc/bond/core/bond.h:9,
from bond/cpp/inc/bond/core/cmdargs.h:8,
from bond/examples/cpp/core/bf/main.cpp:4:
bond/cpp/inc/bond/protocol/encoding.h:155:13: note: candidate: char bond::detail::HexDigit(int)
inline char HexDigit(int n)
^~~~~~~~
bond/cpp/inc/bond/protocol/encoding.h:161:12: note: candidate: int bond::detail::HexDigit(char)
inline int HexDigit(char c)
^~~~~~~~
Signed-off-by: Sinan Kaya [email protected]