summaryrefslogtreecommitdiffstats
path: root/src/Symbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Symbol.cpp')
-rw-r--r--src/Symbol.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Symbol.cpp b/src/Symbol.cpp
index fdaf711..4fe049e 100644
--- a/src/Symbol.cpp
+++ b/src/Symbol.cpp
@@ -53,19 +53,14 @@ Symbol::is_valid(const std::basic_string<char>& symbol)
* This will make a best effort at turning @a str into a complete, valid
* Symbol, and will always return one.
*/
-string
+Raul::Symbol
Symbol::symbolify(const std::basic_string<char>& str)
{
string symbol = str;
Path::replace_invalid_chars(symbol, 0, true);
- if (symbol.length() == 0)
- return "_";
-
- assert(is_valid(symbol));
-
- return symbol;
+ return Raul::Symbol(symbol.empty() ? "_" : symbol);
}
} // namespace Raul