@@ -389,7 +389,7 @@ def outputValidationInternalProtos(self):
389389 validation_internal_protos += ' XrObjectType handle2_type, const uint64_t handle2,\n '
390390 validation_internal_protos += ' bool check_this);\n '
391391 validation_internal_protos += '\n // Function to check if an extension has been enabled\n '
392- validation_internal_protos += 'bool ExtensionEnabled(std::vector<std::string> &extensions, const char* const check_extension_name);\n '
392+ validation_internal_protos += 'bool ExtensionEnabled(const std::vector<std::string> &extensions, const char* const check_extension_name);\n '
393393 validation_internal_protos += '\n // Functions to validate structures\n '
394394 for xr_struct in self .api_structures :
395395 if xr_struct .protect_value :
@@ -605,9 +605,9 @@ def outputValidationHeaderInfo(self):
605605 # Generate C++ utility functions to verify that all the required extensions have been enabled.
606606 # self the ValidationSourceOutputGenerator object
607607 def writeVerifyExtensions (self ):
608- verify_extensions = 'bool ExtensionEnabled(std::vector<std::string> &extensions, const char* const check_extension_name) {\n '
608+ verify_extensions = 'bool ExtensionEnabled(const std::vector<std::string> &extensions, const char* const check_extension_name) {\n '
609609 verify_extensions += self .writeIndent (1 )
610- verify_extensions += 'for (auto enabled_extension: extensions) {\n '
610+ verify_extensions += 'for (const auto& enabled_extension: extensions) {\n '
611611 verify_extensions += self .writeIndent (2 )
612612 verify_extensions += 'if (enabled_extension == check_extension_name) {\n '
613613 verify_extensions += self .writeIndent (3 )
0 commit comments