tapio / rlutil

C and C++ utilities for cross-platform console roguelike game creation.
http://tapio.github.com/rlutil/
229 stars 42 forks source link

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

Open MangaD opened 8 years ago

MangaD commented 8 years ago

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 commented 8 years ago

Helped me a lot, thanks man!

nabijaczleweli commented 8 years ago

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

MangaD commented 8 years ago

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