File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 33#pragma once
44
55#include " global.h"
6- #include " string_functions.h"
76
87namespace libscratchcpp
98{
@@ -15,7 +14,7 @@ extern "C"
1514 {
1615 // NOTE: Constructors and destructors only work in C++ code and are not supposed to be used in LLVM IR
1716 StringPtr () = default ;
18- StringPtr (const std::string &str) { string_assign_cstring ( this , str. c_str ()); }
17+ StringPtr (const std::string &str);
1918 StringPtr (const StringPtr &) = delete ;
2019
2120 ~StringPtr ()
Original file line number Diff line number Diff line change 1010#include < scratchcpp/thread.h>
1111#include < scratchcpp/compilerconstant.h>
1212#include < scratchcpp/promise.h>
13- #include < scratchcpp/stringptr .h>
13+ #include < scratchcpp/string_functions .h>
1414#include < scratchcpp/sprite.h>
1515#include < scratchcpp/itimer.h>
1616#include < utf8.h>
Original file line number Diff line number Diff line change 1111#include < scratchcpp/sprite.h>
1212#include < scratchcpp/stage.h>
1313#include < scratchcpp/costume.h>
14- #include < scratchcpp/stringptr .h>
14+ #include < scratchcpp/string_functions .h>
1515#include < scratchcpp/string_pool.h>
1616#include < scratchcpp/value.h>
1717#include < scratchcpp/input.h>
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ target_sources(scratchcpp
22 PRIVATE
33 value_functions.cpp
44 value_functions_p.h
5+ stringptr.cpp
56 string_functions.cpp
67 string_pool.cpp
78 string_pool_p.h
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+
3+ #include < scratchcpp/stringptr.h>
4+ #include < scratchcpp/string_functions.h>
5+
6+ using namespace libscratchcpp ;
7+
8+ StringPtr::StringPtr (const std::string &str)
9+ {
10+ string_assign_cstring (this , str.c_str ());
11+ }
You can’t perform that action at this time.
0 commit comments