Skip to content

Commit 36489e6

Browse files
committed
fix windows compilation
1 parent 7771171 commit 36489e6

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/cmake_windows.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ jobs:
2323
- name: Install Conan
2424
id: conan
2525
uses: turtlebrowser/get-conan@main
26-
with:
27-
version: 1.59.0
2826

2927
- name: Create default profile
30-
run: conan profile new default --detect
28+
run: conan profile detect
3129

3230
- name: Create Build Environment
3331
# Some projects don't allow in-source building, so create a separate build directory

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ CMakeSettings.json
1111

1212
# OSX junk
1313
.DS_Store
14+
CMakeUserPresets.json

include/behaviortree_cpp/json_export.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,12 @@ template <typename T>
100100
inline void JsonExporter::addConverter()
101101
{
102102
ToJonConverter to_converter = [](const BT::Any& entry, nlohmann::json& dst) {
103-
using namespace nlohmann;
104-
to_json(dst, *const_cast<BT::Any&>(entry).castPtr<T>());
103+
dst = *const_cast<BT::Any&>(entry).castPtr<T>();
105104
};
106105
to_json_converters_.insert({ typeid(T), to_converter });
107106

108-
FromJonConverter from_converter = [](const nlohmann::json& dst) -> Entry {
109-
T value;
110-
using namespace nlohmann;
111-
from_json(dst, value);
107+
FromJonConverter from_converter = [](const nlohmann::json& src) -> Entry {
108+
T value = src.get<T>();
112109
return { BT::Any(value), BT::TypeInfo::Create<T>() };
113110
};
114111

src/basic_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ int64_t convertFromString<int64_t>(StringView str)
128128
}
129129

130130
template <>
131-
uint64_t convertFromString<unsigned long>(StringView str)
131+
uint64_t convertFromString<uint64_t>(StringView str)
132132
{
133133
unsigned long result = 0;
134134
auto [ptr, ec] = std::from_chars(str.data(), str.data() + str.size(), result);

0 commit comments

Comments
 (0)