mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-22 02:45:49 -04:00
parent
9a51843727
commit
4f66b8d8f7
2 changed files with 14 additions and 1 deletions
|
@ -8,12 +8,18 @@ namespace { namespace format_strings {
|
|||
)GEN";
|
||||
|
||||
char const* class_includes = R"GEN(#pragma once
|
||||
#include <Geode/platform/platform.hpp>
|
||||
#include <Geode/c++stl/gdstdlib.hpp>
|
||||
#include <cocos2d.h>
|
||||
#include <cocos-ext.h>
|
||||
#include <Geode/GeneratedPredeclare.hpp>
|
||||
#include <Geode/Enums.hpp>
|
||||
|
||||
)GEN";
|
||||
|
||||
char const* class_no_includes = R"GEN(#pragma once
|
||||
#include <Geode/platform/platform.hpp>
|
||||
|
||||
)GEN";
|
||||
|
||||
char const* class_include_prereq = R"GEN(#include "{file_name}"
|
||||
|
@ -79,7 +85,7 @@ std::string generateBindingHeader(Root& root, ghc::filesystem::path const& singl
|
|||
if (cls.name != "GDString") {
|
||||
single_output += format_strings::class_includes;
|
||||
} else {
|
||||
single_output += "#pragma once\n#include <Geode/platform/platform.hpp>\n";
|
||||
single_output += format_strings::class_no_includes;
|
||||
}
|
||||
|
||||
for (auto dep : cls.depends) {
|
||||
|
|
|
@ -43,6 +43,13 @@ namespace gd {
|
|||
(void)this->winAssign(val.c_str(), val.size());
|
||||
}
|
||||
|
||||
template <class Param>
|
||||
string& operator=(Params&& param) {
|
||||
std::string val;
|
||||
val = std::forward<Params>(param);
|
||||
(void)this->winAssign(val.c_str(), val.size());
|
||||
}
|
||||
|
||||
~string() {
|
||||
(void)this->winDtor();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue