Skip to content

Commit

Permalink
BLUGA: Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Nov 5, 2023
1 parent 79aae2a commit 8862afd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libs/B-luga/include/B-luga/Json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,20 @@ class Json {
return jsonData[index].get<T>();
}

template <typename T>
std::vector<T> getObjectsIdInArray(const std::string &dataType, const std::string &arrayName)
{
std::vector<T> ids;
auto data = getDataByJsonType(dataType)[arrayName];

for (const auto &object : data) {
if (isDataExist(object, "id")) {
ids.push_back(object["id"].get<T>());
}
}
return ids;
}

template <typename T>
T getDataByVector(const std::string &dataType, const std::vector<std::string> &indexes)
{
Expand Down
1 change: 1 addition & 0 deletions libs/B-luga/include/B-luga/Maths/Maths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#pragma once

#define _USE_MATH_DEFINES
#include <cmath>
#include <stdexcept>

Expand Down

0 comments on commit 8862afd

Please sign in to comment.