mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-05 13:04:54 +02:00
Compile fix. Please do not use undefined default (?) constructors.
This commit is contained in:
parent
235cf458d7
commit
406346a6ab
@ -1028,9 +1028,12 @@ void CComponentBox::placeComponents(bool selectable)
|
||||
size_t comps;
|
||||
int width;
|
||||
int height;
|
||||
RowData (size_t Comps, int Width, int Height):
|
||||
comps(Comps), width (Width), height (Height){};
|
||||
};
|
||||
std::vector<RowData> rows;
|
||||
rows.push_back({0, 0, 0});
|
||||
//rows.push_back({0, 0, 0}); //there is NO such syntax!
|
||||
rows.push_back (RowData (0,0,0));
|
||||
|
||||
//split components in rows
|
||||
BOOST_FOREACH(auto & comp, components)
|
||||
@ -1040,7 +1043,7 @@ void CComponentBox::placeComponents(bool selectable)
|
||||
|
||||
//start next row
|
||||
if (pos.w != 0 && rows.back().width + comp->pos.w > pos.w)
|
||||
rows.push_back({0, 0, 0});
|
||||
rows.push_back (RowData (0,0,0));
|
||||
|
||||
rows.back().comps++;
|
||||
rows.back().width += comp->pos.w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user