Skip to content
Snippets Groups Projects
Commit 54f6cfb4 authored by Julius Nehring-Wirxel's avatar Julius Nehring-Wirxel
Browse files

Fix lifetime issue

parent a3ba63fc
No related branches found
No related tags found
1 merge request!41Add api using cc::span for all functions that take contiguous ranges
......@@ -111,7 +111,7 @@ void Shader::reload()
compile();
}
void Shader::setSource(std::string_view source) { setSource(std::vector<std::string>({std::string(source)})); }
void Shader::setSource(std::string_view source) { setSource({std::string(source)}); }
void Shader::setSource(cc::span<std::string const> sources)
{
......@@ -119,7 +119,7 @@ void Shader::setSource(cc::span<std::string const> sources)
mDependencyFlags.clear();
mSources = std::vector(sources.begin(), sources.end());
auto parsedSources = sParser ? sParser->parse(this, mSources) : sources;
auto parsedSources = sParser ? sParser->parse(this, mSources) : mSources;
std::vector<const GLchar*> srcs;
srcs.resize(parsedSources.size());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment