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

C4800: Implicit converion from int to bool #131

Closed
Elewyth opened this issue May 12, 2020 · 0 comments · Fixed by #132
Closed

C4800: Implicit converion from int to bool #131

Elewyth opened this issue May 12, 2020 · 0 comments · Fixed by #132

Comments

@Elewyth
Copy link
Contributor

Elewyth commented May 12, 2020

Whenever I try to compile my C++ UE 4.25 project with VS2019 I get the following error(s):

`/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(130): error C4800: Implicit conversion from 'int' to bool. Possible information loss

/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(130): note: consider using explicit cast or comparison to 0 to avoid this warning

/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(287): error C4800: Implicit conversion from 'const int' to bool. Possible information loss

/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(287): note: consider using explicit cast or comparison to 0 to avoid this warning

/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(297): error C4800: Implicit conversion from 'const int' to bool. Possible information loss

/Plugins/UE4GitPlugin/Source/GitSourceControl/Private/GitSourceControlProvider.cpp(297): note: consider using explicit cast or comparison to 0 to avoid this warning`

I'm not sure why the build tool tires to compile the plugin in the first place, might be a configuration error on my side. Nonetheless it seems like there is a Warning in your code which is configured to be an error by default in either UE 4.25 or VS2019. I can fix it temporarily by disabling the error on my side, but a fix in the code would greatly be appreciated. I'll see if I can make a PR for this :).

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 a pull request may close this issue.

1 participant