Remove AUTO_VAR macro and _toString function (#592)
This commit is contained in:
@@ -20,9 +20,9 @@ FlatGeneratorInfo::FlatGeneratorInfo()
|
||||
|
||||
FlatGeneratorInfo::~FlatGeneratorInfo()
|
||||
{
|
||||
for(AUTO_VAR(it, layers.begin()); it != layers.end(); ++it)
|
||||
for(auto& layer : layers)
|
||||
{
|
||||
delete *it;
|
||||
delete layer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,8 @@ void FlatGeneratorInfo::updateLayers()
|
||||
{
|
||||
int y = 0;
|
||||
|
||||
for(AUTO_VAR(it, layers.begin()); it != layers.end(); ++it)
|
||||
for(auto& layer : layers)
|
||||
{
|
||||
FlatLayerInfo *layer = *it;
|
||||
layer->setStart(y);
|
||||
y += layer->getHeight();
|
||||
}
|
||||
@@ -113,7 +112,7 @@ wstring FlatGeneratorInfo::toString()
|
||||
#endif
|
||||
}
|
||||
|
||||
FlatLayerInfo *FlatGeneratorInfo::getLayerFromString(const wstring &input, int yOffset)
|
||||
FlatLayerInfo *FlatGeneratorInfo::getLayerFromString(const wstring &input, int yOffset)
|
||||
{
|
||||
return NULL;
|
||||
#if 0
|
||||
@@ -159,9 +158,9 @@ vector<FlatLayerInfo *> *FlatGeneratorInfo::getLayersFromString(const wstring &i
|
||||
|
||||
int yOffset = 0;
|
||||
|
||||
for(AUTO_VAR(it, depths.begin()); it != depths.end(); ++it)
|
||||
for(auto& depth : depths)
|
||||
{
|
||||
FlatLayerInfo *layer = getLayerFromString(*it, yOffset);
|
||||
FlatLayerInfo *layer = getLayerFromString(depth, yOffset);
|
||||
if (layer == NULL) return NULL;
|
||||
result->push_back(layer);
|
||||
yOffset += layer->getHeight();
|
||||
@@ -203,8 +202,8 @@ FlatGeneratorInfo *FlatGeneratorInfo::fromValue(const wstring &input)
|
||||
{
|
||||
std::vector<std::wstring> structures = stringSplit(parts[index++], L',');
|
||||
|
||||
for(AUTO_VAR(it, structures.begin()); it != structures.end(); ++it)
|
||||
{
|
||||
for (auto it = structures.begin(); it != structures.end(); ++it)
|
||||
{
|
||||
std::vector<std::wstring> separated = stringSplit(parts[index++], L"\\(");
|
||||
|
||||
unordered_map<wstring, wstring> structureOptions;
|
||||
|
||||
Reference in New Issue
Block a user