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

rlutil.h - line 577 - Warning: Converting of "size_t" to "unsigned int", data loss possible. #46

Open
MangaD opened this issue Jun 3, 2016 · 3 comments

Comments

@MangaD
Copy link

MangaD commented Jun 3, 2016

On line 577 change:
unsigned int len = str_.size();
to:
unsigned int len = static_cast<unsigned int>(str_.size());

On line 580 change:
unsigned int len = strlen(str);
to:
unsigned int len = (unsigned int) strlen(str);

@zlyfer
Copy link

zlyfer commented Jun 3, 2016

Helped me a lot, thanks man!

@MangaD MangaD changed the title rlutil.h - line 595 - Warning: Converting of "size_t" to "unsigned int", data loss possible. rlutil.h - line 577 - Warning: Converting of "size_t" to "unsigned int", data loss possible. Jun 3, 2016
@nabijaczleweli
Copy link
Contributor

Make L577 auto len = static_cast<unsigned int>(str_.size()); since you're specifying the type anyway.

@MangaD
Copy link
Author

MangaD commented Jun 4, 2016

Didn't want to use C++11...

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

No branches or pull requests

3 participants