From 076c6bfaf40664ae0f2796198417734d1272c545 Mon Sep 17 00:00:00 2001 From: BearOso Date: Thu, 2 Feb 2023 16:29:29 -0600 Subject: [PATCH] Use length instead of size with strings. --- vulkan/slang_helpers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vulkan/slang_helpers.cpp b/vulkan/slang_helpers.cpp index ac267f0a..09020b77 100644 --- a/vulkan/slang_helpers.cpp +++ b/vulkan/slang_helpers.cpp @@ -37,7 +37,7 @@ int get_significant_digits(const string_view &view) auto pos = view.rfind('.'); if (pos == string_view::npos) return 0; - return view.size() - pos - 1; + return view.length() - pos - 1; } vector split_string_quotes(const string_view &view) @@ -63,7 +63,7 @@ vector split_string_quotes(const string_view &view) { indexb = view.find_first_of("\t\r\n ", indexa); if (indexb == string::npos) - indexb = view.size(); + indexb = view.length(); } if (indexb > indexa) @@ -105,7 +105,7 @@ vector split_string(const string_view &str, unsigned char delim) bool ends_with(const string &str, const string &ext) { - if (ext.size() > str.size()) + if (ext.length() > str.length()) return false; auto icmp = [](const unsigned char a, const unsigned char b) -> bool {