Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[c++] Cast HexDigit argument to int #954

Closed
wants to merge 1 commit into from

Conversation

franksinankaya
Copy link
Contributor

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]

cpp/inc/bond/protocol/simple_json_writer.h Outdated Show resolved Hide resolved
cpp/inc/bond/protocol/simple_json_writer.h Outdated Show resolved Hide resolved
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]>
@franksinankaya franksinankaya changed the title [c++] Cast HexDigit argument to char [c++] Cast HexDigit argument to int Feb 1, 2019
@franksinankaya
Copy link
Contributor Author

Time to merge?

@chwarr
Copy link
Member

chwarr commented Feb 4, 2019

In the future, please avoid force pushing when addressing PR feedback: instead just add more commits. We'll squash them when merging.

The GitHub UI doesn't yet handle force pushes well during a PR, and it is hard as a reviewer to diff across force pushes. It's gotten better in the past few months, but it's still easy to confuse GitHub.

@chwarr chwarr closed this in 520bf4c Feb 4, 2019
chwarr added a commit that referenced this pull request Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants