mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fixed previous commit for Linux/OSX
This commit is contained in:
parent
1130d78c19
commit
5ccd9d9d9a
1 changed files with 3 additions and 1 deletions
|
@ -977,7 +977,9 @@ template<typename T>
|
||||||
{
|
{
|
||||||
// Legacy conversion, which is costly due to having to make a copy of the string before conversion.
|
// Legacy conversion, which is costly due to having to make a copy of the string before conversion.
|
||||||
try {
|
try {
|
||||||
std::string str { str };
|
assert(sv.size() < 1024);
|
||||||
|
assert(sv.data() != nullptr);
|
||||||
|
std::string str { sv };
|
||||||
size_t read = 0;
|
size_t read = 0;
|
||||||
if constexpr (std::is_same_v<T, int>)
|
if constexpr (std::is_same_v<T, int>)
|
||||||
out = std::stoi(str, &read);
|
out = std::stoi(str, &read);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue