mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix compilation errors
This commit is contained in:
@@ -393,14 +393,14 @@ class GD_CORE_API EventsCodeGenerator {
|
||||
*
|
||||
* Example: "gdjs.something."
|
||||
*/
|
||||
virtual gd::String GetCodeNamespaceAccessor();
|
||||
virtual gd::String GetCodeNamespaceAccessor() { return ""; };
|
||||
|
||||
/**
|
||||
* \brief Get the namespace to be used to store code generated objects/values/functions.
|
||||
*
|
||||
* Example: "gdjs.something"
|
||||
*/
|
||||
virtual gd::String GetCodeNamespace();
|
||||
virtual gd::String GetCodeNamespace() { return ""; };
|
||||
protected:
|
||||
/**
|
||||
* \brief Generate the code for a single parameter.
|
||||
|
@@ -63,7 +63,9 @@ class Extension : public ExtensionBase {
|
||||
gd::String functionName =
|
||||
instruction.GetParameter(0).GetPlainString();
|
||||
|
||||
if (!codeGenerator.HasProjectAndLayout()) return "/*Function generation not supported without layout*/";
|
||||
if (!codeGenerator.HasProjectAndLayout()) {
|
||||
return gd::String("/*Function generation not supported without layout*/");
|
||||
}
|
||||
|
||||
const gd::Project& project = codeGenerator.GetProject();
|
||||
const gd::Layout& layout = codeGenerator.GetLayout();
|
||||
|
@@ -194,7 +194,7 @@ gd::String EventsCodeGenerator::GenerateBehaviorCondition(
|
||||
|
||||
// Verify that object has behavior.
|
||||
vector<gd::String> behaviors =
|
||||
gd::GetBehaviorsOfObject(GetGlobalObjectAndGroups(), GetObjectAndGroups(), objectName);
|
||||
gd::GetBehaviorsOfObject(GetGlobalObjectsAndGroups(), GetObjectsAndGroups(), objectName);
|
||||
if (find(behaviors.begin(), behaviors.end(), behaviorName) ==
|
||||
behaviors.end()) {
|
||||
cout << "Bad behavior requested" << endl;
|
||||
@@ -326,7 +326,7 @@ gd::String EventsCodeGenerator::GenerateBehaviorAction(
|
||||
|
||||
// Verify that object has behavior.
|
||||
vector<gd::String> behaviors =
|
||||
gd::GetBehaviorsOfObject(GetGlobalObjectAndGroups(), GetObjectAndGroups(), objectName);
|
||||
gd::GetBehaviorsOfObject(GetGlobalObjectsAndGroups(), GetObjectsAndGroups(), objectName);
|
||||
if (find(behaviors.begin(), behaviors.end(), behaviorName) ==
|
||||
behaviors.end()) {
|
||||
cout << "Bad behavior requested for an action" << endl;
|
||||
|
@@ -264,7 +264,7 @@ CommonInstructionsExtension::CommonInstructionsExtension() {
|
||||
gd::EventsCodeGenerator& codeGenerator,
|
||||
gd::EventsCodeGenerationContext& context) {
|
||||
if (!codeGenerator.HasProjectAndLayout()) {
|
||||
return "/*Link not supported when generating code without a layout*/"
|
||||
return gd::String("/*Link not supported when generating code without a layout*/");
|
||||
};
|
||||
gd::LinkEvent& event = dynamic_cast<gd::LinkEvent&>(event_);
|
||||
|
||||
|
Reference in New Issue
Block a user