Added missing const qualifier for member functions in non-enhanced mode, added some checks agains not defined VK_CPP_ENHANCED_MODE to prevent multiple functions with identical signature

This commit is contained in:
Andreas Süßenbach 2016-03-02 11:56:09 +01:00
parent 72cdec99c0
commit dfd3253029
2 changed files with 261 additions and 167 deletions

View File

@ -2205,7 +2205,12 @@ void writeTypeCommandStandard(std::ofstream & ofs, std::string const& indentatio
} }
argEncountered = true; argEncountered = true;
} }
ofs << " )" << std::endl ofs << " )";
if (commandData.handleCommand)
{
ofs << " const";
}
ofs << std::endl
<< indentation << "{" << std::endl << indentation << "{" << std::endl
<< indentation << " "; << indentation << " ";
bool castReturn = false; bool castReturn = false;
@ -2543,7 +2548,16 @@ void writeTypeHandle(std::ofstream & ofs, DependencyData const& dependencyData,
std::string className = dependencyData.name; std::string className = dependencyData.name;
std::string functionName = determineFunctionName(dep->name, cit->second); std::string functionName = determineFunctionName(dep->name, cit->second);
bool hasPointers = hasPointerArguments(cit->second);
if (!hasPointers)
{
ofs << "#ifndef VKCPP_ENHANCED_MODE" << std::endl;
}
writeTypeCommandStandard(ofs, " ", functionName, *dep, cit->second, vkTypes); writeTypeCommandStandard(ofs, " ", functionName, *dep, cit->second, vkTypes);
if (!hasPointers)
{
ofs << "#endif /*!VKCPP_ENHANCED_MODE*/" << std::endl;
}
ofs << std::endl ofs << std::endl
<< "#ifdef VKCPP_ENHANCED_MODE" << std::endl; << "#ifdef VKCPP_ENHANCED_MODE" << std::endl;

File diff suppressed because it is too large Load Diff