Skip to content

Commit 8862afd

Browse files
committed
BLUGA: Fix compile
1 parent 79aae2a commit 8862afd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

libs/B-luga/include/B-luga/Json.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ class Json {
174174
return jsonData[index].get<T>();
175175
}
176176

177+
template <typename T>
178+
std::vector<T> getObjectsIdInArray(const std::string &dataType, const std::string &arrayName)
179+
{
180+
std::vector<T> ids;
181+
auto data = getDataByJsonType(dataType)[arrayName];
182+
183+
for (const auto &object : data) {
184+
if (isDataExist(object, "id")) {
185+
ids.push_back(object["id"].get<T>());
186+
}
187+
}
188+
return ids;
189+
}
190+
177191
template <typename T>
178192
T getDataByVector(const std::string &dataType, const std::vector<std::string> &indexes)
179193
{

libs/B-luga/include/B-luga/Maths/Maths.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#define _USE_MATH_DEFINES
1011
#include <cmath>
1112
#include <stdexcept>
1213

0 commit comments

Comments
 (0)