diff --git a/sources/enduro2d/core/debug.cpp b/sources/enduro2d/core/debug.cpp index 54ce5340..2405c982 100644 --- a/sources/enduro2d/core/debug.cpp +++ b/sources/enduro2d/core/debug.cpp @@ -95,7 +95,7 @@ namespace e2d const str log_text = log_text_format(lvl, text); const std::ptrdiff_t rprintf = std::printf("%s", log_text.c_str()); return rprintf >= 0 - && math::numeric_cast(rprintf) == log_text.length(); + && math::numeric_cast(rprintf) == log_text.size(); } catch (...) { return false; } diff --git a/sources/enduro2d/core/render_impl/render_opengl_base.cpp b/sources/enduro2d/core/render_impl/render_opengl_base.cpp index 01d88caf..62f02a05 100644 --- a/sources/enduro2d/core/render_impl/render_opengl_base.cpp +++ b/sources/enduro2d/core/render_impl/render_opengl_base.cpp @@ -146,7 +146,7 @@ namespace if ( ver ) { const str_view ver_str = str_view(reinterpret_cast(ver)); const std::size_t dot = ver_str.find('.'); - if ( dot > 0 && dot + 1 < ver_str.length() ) { + if ( dot > 0 && dot + 1 < ver_str.size() ) { major = ver[dot - 1] - '0'; minor = ver[dot + 1] - '0'; } diff --git a/sources/enduro2d/core/vfs.cpp b/sources/enduro2d/core/vfs.cpp index 5fd4b5d5..30ade320 100644 --- a/sources/enduro2d/core/vfs.cpp +++ b/sources/enduro2d/core/vfs.cpp @@ -330,7 +330,7 @@ namespace e2d mz_zip_archive_file_stat file_stat; if ( mz_zip_reader_file_stat(state_->archive.get(), i, &file_stat) ) { const str_view filename{file_stat.m_filename}; - if ( filename.length() > parent.length() && strings::starts_with(filename, parent) ) { + if ( filename.size() > parent.size() && strings::starts_with(filename, parent) ) { func(file_stat.m_filename, !!file_stat.m_is_directory); } } diff --git a/sources/enduro2d/utils/mesh_impl/mesh_reader_e2d.cpp b/sources/enduro2d/utils/mesh_impl/mesh_reader_e2d.cpp index d5a8ed0b..6df2c6d5 100644 --- a/sources/enduro2d/utils/mesh_impl/mesh_reader_e2d.cpp +++ b/sources/enduro2d/utils/mesh_impl/mesh_reader_e2d.cpp @@ -23,9 +23,9 @@ namespace u32 file_version = 0; char* file_signature = static_cast(E2D_CLEAR_ALLOCA( - mesh_file_signature.length() + 1)); + mesh_file_signature.size() + 1)); - iseq.read(file_signature, mesh_file_signature.length()) + iseq.read(file_signature, mesh_file_signature.size()) .read(file_version); return iseq.success() diff --git a/sources/enduro2d/utils/path.cpp b/sources/enduro2d/utils/path.cpp index df1a0923..163dfa99 100644 --- a/sources/enduro2d/utils/path.cpp +++ b/sources/enduro2d/utils/path.cpp @@ -55,14 +55,14 @@ namespace e2d::path const str name = filename(path); return name.empty() ? str(path) - : str(path.substr(0, path.length() - name.length())); + : str(path.substr(0, path.size() - name.size())); } str remove_extension(str_view path) { const str ext = extension(path); return ext.empty() ? str(path) - : str(path.substr(0, path.length() - ext.length())); + : str(path.substr(0, path.size() - ext.size())); } str replace_filename(str_view path, str_view filename) { diff --git a/sources/enduro2d/utils/shape_impl/shape_reader_e2d.cpp b/sources/enduro2d/utils/shape_impl/shape_reader_e2d.cpp index 204cbde5..cafffd4a 100644 --- a/sources/enduro2d/utils/shape_impl/shape_reader_e2d.cpp +++ b/sources/enduro2d/utils/shape_impl/shape_reader_e2d.cpp @@ -23,9 +23,9 @@ namespace u32 file_version = 0; char* file_signature = static_cast(E2D_CLEAR_ALLOCA( - shape_file_signature.length() + 1)); + shape_file_signature.size() + 1)); - iseq.read(file_signature, shape_file_signature.length()) + iseq.read(file_signature, shape_file_signature.size()) .read(file_version); return iseq.success() diff --git a/sources/enduro2d/utils/strings.cpp b/sources/enduro2d/utils/strings.cpp index b3152aaa..777639ab 100644 --- a/sources/enduro2d/utils/strings.cpp +++ b/sources/enduro2d/utils/strings.cpp @@ -329,12 +329,12 @@ namespace e2d::strings } bool starts_with(str_view input, str_view test) noexcept { - return input.length() >= test.length() - && 0 == input.compare(0, test.length(), test); + return input.size() >= test.size() + && 0 == input.compare(0, test.size(), test); } bool ends_with(str_view input, str_view test) noexcept { - return input.length() >= test.length() - && 0 == input.compare(input.length() - test.length(), test.length(), test); + return input.size() >= test.size() + && 0 == input.compare(input.size() - test.size(), test.size(), test); } } diff --git a/sources/enduro2d/utils/url.cpp b/sources/enduro2d/utils/url.cpp index b44139ef..ef8b23c8 100644 --- a/sources/enduro2d/utils/url.cpp +++ b/sources/enduro2d/utils/url.cpp @@ -46,7 +46,7 @@ namespace } return std::make_pair( str(schemepath.substr(0, sep_pos)), - str(schemepath.substr(sep_pos + scheme_separator.length()))); + str(schemepath.substr(sep_pos + scheme_separator.size()))); } }