mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: function returns by const value
This commit is contained in:
parent
d292ef130c
commit
a5dc187481
14 changed files with 41 additions and 28 deletions
|
|
@ -42,10 +42,10 @@ const std::string& GLSLExtension::getHeader(const std::string& name) const {
|
|||
return found->second;
|
||||
}
|
||||
|
||||
const std::string GLSLExtension::getDefine(const std::string& name) const {
|
||||
const std::string& GLSLExtension::getDefine(const std::string& name) const {
|
||||
auto found = defines.find(name);
|
||||
if (found == defines.end()) {
|
||||
return "";
|
||||
throw std::runtime_error("name '"+name+"' is not defined");
|
||||
}
|
||||
return found->second;
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ inline void source_line(std::stringstream& ss, uint linenum) {
|
|||
ss << "#line " << linenum << "\n";
|
||||
}
|
||||
|
||||
const std::string GLSLExtension::process(const fs::path& file, const std::string& source) {
|
||||
std::string GLSLExtension::process(const fs::path& file, const std::string& source) {
|
||||
std::stringstream ss;
|
||||
size_t pos = 0;
|
||||
uint linenum = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue