Fix the low perfomance in titlescreen (and maybe elsewhere whitout active map)
It was a bad initialisation of map size. Maybe use size_t ? or check if <= 0 ? or use 0 as default instead of -1 But beter discuss it after the release (and avoid multiple changes in map.hpp)
This commit is contained in:
parent
b15ecaa6a1
commit
be91d1d5ce
1 changed files with 2 additions and 0 deletions
|
@ -325,6 +325,8 @@ void gamemap::read(const std::string& data, const tborder border_tiles, const tu
|
|||
std::map<int, t_translation::coordinate> starting_positions;
|
||||
|
||||
if(data.empty()) {
|
||||
w_ = 0;
|
||||
h_ = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue