aboutsummaryrefslogtreecommitdiff
path: root/extension/src/Utilities.hpp
blob: 75e873f28cf8be1428f68d8cd0690f33de083d76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <godot_cpp/variant/string.hpp>

#include "openvic/Types.hpp"

#define ERR(x) ((x) == SUCCESS ? OK : FAILED)

namespace OpenVic {

   inline std::string godot_to_std_string(godot::String const& str) {
      return str.ascii().get_data();
   }

   inline godot::String std_to_godot_string(std::string const& str) {
      return str.c_str();
   }
}