@@ -3639,7 +3639,7 @@ struct VM {
36393639 print_to_stream(ss, std::forward<Args>(message)...);
36403640 std::string msg_content = ss.str();
36413641
3642- if (! printed_messages.contains (msg_content)) {
3642+ if (printed_messages.find (msg_content) == printed_messages.end( )) {
36433643 #if (LINUX || APPLE)
36443644 constexpr const char* black_bg = "\x1B[48;2;0;0;0m";
36453645 constexpr const char* bold = "\033[1m";
@@ -4925,7 +4925,7 @@ struct VM {
49254925 const std::string& brand = cpu::get_brand();
49264926
49274927 // easy shortcut for QEMU
4928- if (brand.starts_with ("QEMU Virtual CPU version") ) {
4928+ if (brand.rfind ("QEMU Virtual CPU version", 0) == 0 ) {
49294929 return core::add(brand_enum::QEMU);
49304930 }
49314931
@@ -6859,7 +6859,7 @@ struct VM {
68596859 continue;
68606860 }
68616861
6862- char* data = content.data() ;
6862+ char* data = & content[0] ;
68636863 const size_t len = content.size();
68646864
68656865 for (size_t i = 0; i < len; ++i) {
@@ -7068,7 +7068,7 @@ struct VM {
70687068 bool ppid_match = false;
70697069
70707070 auto parse_number = [&](const std::string& prefix) -> int {
7071- if (! line.starts_with (prefix) ) {
7071+ if (line.rfind (prefix, 0) != 0 ) {
70727072 return -1;
70737073 }
70747074
@@ -7480,7 +7480,7 @@ struct VM {
74807480 return core::add(brand_enum::AZURE_HYPERV);
74817481 }
74827482 template <typename T, size_t N>
7483- constexpr bool check_no_nulls(const std::array<T, N>& arr, size_t i = 0) {
7483+ constexpr bool check_no_nulls(const std::array<T, N>& arr, size_t i = 0) const {
74847484 return (i == N)
74857485 ? true
74867486 : (arr[i] != nullptr && check_no_nulls(arr, i + 1));
@@ -13209,8 +13209,8 @@ struct VM {
1320913209 };
1321013210
1321113211 // entry for the initialization list
13212- struct technique_entry {
13213- enum_flags id = enum_flags::NULL_ARG ;
13212+ struct technique_entry { // NOLINT(cppcoreguidelines-pro-type-member-init)
13213+ enum_flags id;
1321413214 technique tech;
1321513215 };
1321613216
@@ -13624,12 +13624,6 @@ struct VM {
1362413624 throw_error("Flag argument must be a technique flag and not a settings flag");
1362513625 }
1362613626
13627- #if (MSVC && !CLANG)
13628- __assume(flag_bit < technique_end);
13629- #elif (VMA_CPP >= 23)
13630- [[assume(flag_bit < technique_end)]];
13631- #endif
13632-
1363313627 // if the technique is already cached, return the cached value instead
1363413628 if (memo::is_cached(flag_bit)) {
1363513629 const memo::data_t data = memo::cache_fetch(flag_bit);
@@ -13817,12 +13811,6 @@ struct VM {
1381713811 if (percent > 100) {
1381813812 throw_error("Percentage parameter must be between 0 and 100");
1381913813 }
13820-
13821- #if (MSVC && !CLANG)
13822- __assume(percent > 0 && percent <= 100);
13823- #elif (VMA_CPP >= 23)
13824- [[assume(percent > 0 && percent <= 100)]];
13825- #endif
1382613814
1382713815 const size_t current_index = core::custom_table.size();
1382813816
0 commit comments