1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

fix inconsistent indent space

This commit is contained in:
jingkaimori 2025-01-22 11:10:46 +08:00
parent 09c5778184
commit cfaf3ab71b

View file

@ -311,23 +311,23 @@ inline std::vector<std::basic_string_view<T> > str_split(
const std::basic_string_view<T> &strv, const std::basic_string_view<T> &strv,
T delimiter) T delimiter)
{ {
std::vector<std::basic_string_view<T>> output; std::vector<std::basic_string_view<T>> output;
size_t first = 0; size_t first = 0;
while (first < strv.size()) while (first < strv.size())
{ {
const auto second = strv.find_first_of(delimiter, first); const auto second = strv.find_first_of(delimiter, first);
if (first != second) if (first != second)
output.push_back(strv.substr(first, second - first)); output.push_back(strv.substr(first, second - first));
if (second == std::string_view::npos) if (second == std::string_view::npos)
break; break;
first = second + 1; first = second + 1;
} }
return output; return output;
} }