diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-01-26 13:34:13 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-01-26 15:45:51 -0700 |
| commit | 85dbd823c410a2817b077e2c6d1ee0cda7e247dd (patch) | |
| tree | 0043e88c6dcea7537d836c1fdb64556b09952a6c /layers/vk_layer_config.cpp | |
| parent | 5492b5039192cb9cae396a96e1fd7cff3852f6da (diff) | |
| download | usermoji-85dbd823c410a2817b077e2c6d1ee0cda7e247dd.tar.xz | |
repo: Clang-format LVL source files using Google
Switch clang-format standard from the LLVM style to the
Google style for more consistency.
Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
Diffstat (limited to 'layers/vk_layer_config.cpp')
| -rw-r--r-- | layers/vk_layer_config.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/layers/vk_layer_config.cpp b/layers/vk_layer_config.cpp index 49cbb9db..ffefbcd6 100644 --- a/layers/vk_layer_config.cpp +++ b/layers/vk_layer_config.cpp @@ -34,14 +34,14 @@ #define MAX_CHARS_PER_LINE 4096 class ConfigFile { - public: + public: ConfigFile(); ~ConfigFile(); const char *getOption(const std::string &_option); void setOption(const std::string &_option, const std::string &_val); - private: + private: bool m_fileIsParsed; std::map<std::string, std::string> m_valueMap; @@ -98,7 +98,6 @@ VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map<std::string, std::string option_list = g_configFileObj.getOption(_option.c_str()); while (option_list.length() != 0) { - // Find length of option string std::size_t option_length = option_list.find(","); if (option_length == option_list.npos) { @@ -158,7 +157,7 @@ ConfigFile::ConfigFile() : m_fileIsParsed(false) { "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG,VK_DBG_LAYER_ACTION_DEBUG_OUTPUT"; m_valueMap["google_unique_objects.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG,VK_DBG_LAYER_ACTION_DEBUG_OUTPUT"; -#else // WIN32 +#else // WIN32 m_valueMap["lunarg_core_validation.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; m_valueMap["lunarg_image.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; m_valueMap["lunarg_object_tracker.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; @@ -166,7 +165,7 @@ ConfigFile::ConfigFile() : m_fileIsParsed(false) { m_valueMap["lunarg_swapchain.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; m_valueMap["google_threading.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; m_valueMap["google_unique_objects.debug_action"] = "VK_DBG_LAYER_ACTION_DEFAULT,VK_DBG_LAYER_ACTION_LOG_MSG"; -#endif // WIN32 +#endif // WIN32 m_valueMap["lunarg_core_validation.log_filename"] = "stdout"; m_valueMap["lunarg_image.log_filename"] = "stdout"; @@ -244,8 +243,7 @@ void ConfigFile::parseFile(const char *filename) { // discard any comments delimited by '#' in the line pComment = strchr(buf, '#'); - if (pComment) - *pComment = '\0'; + if (pComment) *pComment = '\0'; if (sscanf(buf, " %511[^\n\t =] = %511[^\n \t]", option, value) == 2) { std::string optStr(option); @@ -265,26 +263,22 @@ void print_msg_flags(VkFlags msgFlags, char *msg_flags) { separator = true; } if (msgFlags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT) { - if (separator) - strcat(msg_flags, ","); + if (separator) strcat(msg_flags, ","); strcat(msg_flags, "INFO"); separator = true; } if (msgFlags & VK_DEBUG_REPORT_WARNING_BIT_EXT) { - if (separator) - strcat(msg_flags, ","); + if (separator) strcat(msg_flags, ","); strcat(msg_flags, "WARN"); separator = true; } if (msgFlags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) { - if (separator) - strcat(msg_flags, ","); + if (separator) strcat(msg_flags, ","); strcat(msg_flags, "PERF"); separator = true; } if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) { - if (separator) - strcat(msg_flags, ","); + if (separator) strcat(msg_flags, ","); strcat(msg_flags, "ERROR"); } } |
