mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Compile fix. Please do not use undefined default (?) constructors.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user