fix functions that create a vector with a size

This commit is contained in:
Wesley Griffin 2017-01-26 12:36:53 -05:00
parent fa7958ea0e
commit 624afed04b
2 changed files with 22216 additions and 22210 deletions

View File

@ -2078,8 +2078,14 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
} }
} }
assert(!size.empty()); assert(!size.empty());
ofs << "( " << size << " )"; ofs << "( " << size;
} else if (commandData.twoStep) if (returnType.find("Allocator") != std::string::npos)
{
ofs << ", " << commandData.arguments[returnIndex].pureType << "(), alloc";
}
ofs << " )";
}
else if (commandData.twoStep)
{ {
ofs << "( alloc )"; ofs << "( alloc )";
} }
@ -3257,7 +3263,7 @@ int main( int argc, char **argv )
<< arrayProxyHeader; << arrayProxyHeader;
// first of all, write out vk::Result and the exception handling stuff // first of all, write out vk::Result and the exception handling stuff
std::list<DependencyData>::const_iterator it = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [](DependencyData const& dp) { return dp.name == "Result"; }); std::list<DependencyData>::iterator it = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [](DependencyData const& dp) { return dp.name == "Result"; });
assert(it != vkData.dependencies.end()); assert(it != vkData.dependencies.end());
writeTypeEnum(ofs, *it, vkData.enums.find(it->name)->second); writeTypeEnum(ofs, *it, vkData.enums.find(it->name)->second);
writeEnumsToString(ofs, *it, vkData.enums.find(it->name)->second); writeEnumsToString(ofs, *it, vkData.enums.find(it->name)->second);

File diff suppressed because it is too large Load Diff