1
0
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:
DjWarmonger
2012-07-03 06:28:11 +00:00
parent 235cf458d7
commit 406346a6ab

View File

@@ -1028,9 +1028,12 @@ void CComponentBox::placeComponents(bool selectable)
size_t comps; size_t comps;
int width; int width;
int height; int height;
RowData (size_t Comps, int Width, int Height):
comps(Comps), width (Width), height (Height){};
}; };
std::vector<RowData> rows; 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 //split components in rows
BOOST_FOREACH(auto & comp, components) BOOST_FOREACH(auto & comp, components)
@@ -1040,7 +1043,7 @@ void CComponentBox::placeComponents(bool selectable)
//start next row //start next row
if (pos.w != 0 && rows.back().width + comp->pos.w > pos.w) 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().comps++;
rows.back().width += comp->pos.w; rows.back().width += comp->pos.w;