[DEV] continue removing STL

This commit is contained in:
Edouard DUPIN 2017-08-29 01:23:23 +02:00
parent 3006c24262
commit 626c4327e1
3 changed files with 7 additions and 9 deletions

View File

@ -6,8 +6,7 @@
#pragma once
#include <etk/types.hpp>
#include <etk/Hash.hpp>
#include <algorithm>
#include <etk/Map.hpp>
#include <ejson/Value.hpp>
#include <ejson/iterator.hpp>

View File

@ -342,11 +342,11 @@ bool ejson::internal::Object::add(const etk::String& _name, ememory::SharedPtr<e
}
void ejson::internal::Object::remove(const etk::String& _name) {
m_value.remove(_name);
m_value.erase(_name);
}
void ejson::internal::Object::remove(size_t _id) {
m_value.remove(getKey(_id));
m_value.erase(getKey(_id));
}
bool ejson::internal::Object::transfertIn(ememory::SharedPtr<ejson::internal::Value> _obj) {

View File

@ -6,8 +6,7 @@
#pragma once
#include <etk/types.hpp>
#include <etk/Hash.hpp>
#include <algorithm>
#include <etk/Map.hpp>
#include <ejson/internal/Value.hpp>
namespace ejson {
@ -20,7 +19,8 @@ namespace ejson {
/**
* @brief basic element of a xml structure
*/
Object() {
Object() :
m_value(0, false) { // Force unorder map
m_type = ejson::valueType::object;
};
public:
@ -36,8 +36,7 @@ namespace ejson {
*/
static ememory::SharedPtr<Object> create(const etk::String& _data);
protected:
// TODO : Change this with a generic methode ...
etk::Hash<ememory::SharedPtr<ejson::internal::Value> > m_value; //!< value of the node (for element this is the name, for text it is the inside text ...)
etk::Map<etk::String, ememory::SharedPtr<ejson::internal::Value>> m_value; //!< value of the node (for element this is the name, for text it is the inside text ...)
public:
/**
* @brief check if an element exist.