migrate from dynamic::Value to dv::value & total erase namespace 'dynamic'

This commit is contained in:
MihailRis
2024-09-18 23:31:18 +03:00
parent d3ba4b2e3e
commit 34d2e6d400
69 changed files with 1247 additions and 2248 deletions
+8 -8
View File
@@ -8,8 +8,8 @@
#include <unordered_map>
#include <vector>
#include "data/dynamic_fwd.hpp"
#include "content_fwd.hpp"
#include "data/dv.hpp"
using DrawGroups = std::set<ubyte>;
template <class K, class V>
@@ -122,18 +122,18 @@ public:
class ResourceIndices {
std::vector<std::string> names;
std::unordered_map<std::string, size_t> indices;
std::unique_ptr<std::vector<dynamic::Map_sptr>> savedData;
std::unique_ptr<std::vector<dv::value>> savedData;
public:
ResourceIndices()
: savedData(std::make_unique<std::vector<dynamic::Map_sptr>>()) {
: savedData(std::make_unique<std::vector<dv::value>>()) {
}
static constexpr size_t MISSING = SIZE_MAX;
void add(std::string name, dynamic::Map_sptr map) {
void add(std::string name, dv::value map) {
indices[name] = names.size();
names.push_back(name);
savedData->push_back(map);
savedData->push_back(std::move(map));
}
const std::string& getName(size_t index) const {
@@ -148,12 +148,12 @@ public:
return MISSING;
}
dynamic::Map_sptr getSavedData(size_t index) const {
dv::value getSavedData(size_t index) const {
return savedData->at(index);
}
void saveData(size_t index, dynamic::Map_sptr map) const {
savedData->at(index) = map;
void saveData(size_t index, dv::value map) const {
savedData->at(index) = std::move(map);
}
size_t size() const {