Fix PLY import error caused by recent cleanup

Regression caused by [0]. Passing "Span" by value caused io_ply test to
fail. References were used so changes would be applied to arguments
passed in.

Revert these changes for "ply_import.cc".

[0]: d338261c55
This commit is contained in:
Campbell Barton
2024-02-28 16:58:11 +11:00
parent 4701879f52
commit 12386e6809

View File

@@ -35,7 +35,7 @@
namespace blender::io::ply {
/* If line starts with keyword, returns true and drops it from the line. */
static bool parse_keyword(Span<char> str, StringRef keyword)
static bool parse_keyword(Span<char> &str, StringRef keyword)
{
const size_t keyword_len = keyword.size();
if (str.size() < keyword_len) {
@@ -48,7 +48,7 @@ static bool parse_keyword(Span<char> str, StringRef keyword)
return true;
}
static Span<char> parse_word(Span<char> str)
static Span<char> parse_word(Span<char> &str)
{
size_t len = 0;
while (len < str.size() && str[len] > ' ') {
@@ -59,7 +59,7 @@ static Span<char> parse_word(Span<char> str)
return word;
}
static void skip_space(Span<char> str)
static void skip_space(Span<char> &str)
{
while (!str.is_empty() && str[0] <= ' ') {
str = str.drop_front(1);