gcc / clang did not like backslashes inside comments
This commit is contained in:
parent
26b003073b
commit
082f88ad5f
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
// Escape \n, \r and \\
|
// Escape \n, \r and backslash
|
||||||
std::string escape_string_cstyle(const std::string &str)
|
std::string escape_string_cstyle(const std::string &str)
|
||||||
{
|
{
|
||||||
// Allocate a buffer twice the input string length,
|
// Allocate a buffer twice the input string length,
|
||||||
@ -94,7 +94,7 @@ std::string escape_strings_cstyle(const std::vector<std::string> &strs)
|
|||||||
return std::string(out.data(), outptr - out.data());
|
return std::string(out.data(), outptr - out.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unescape \n, \r and \\
|
// Unescape \n, \r and backslash
|
||||||
bool unescape_string_cstyle(const std::string &str, std::string &str_out)
|
bool unescape_string_cstyle(const std::string &str, std::string &str_out)
|
||||||
{
|
{
|
||||||
std::vector<char> out(str.size(), 0);
|
std::vector<char> out(str.size(), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user