From 8138c6411619647768e55344b7a74354b06edc42 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Wed, 5 Nov 2014 13:12:20 +0100 Subject: [PATCH] Renamed NodeIterator into ListIterator --- include/ArduinoJson/Internals/List.hpp | 10 +++++----- .../{NodeConstIterator.hpp => ListConstIterator.hpp} | 10 +++++----- .../Internals/{NodeIterator.hpp => ListIterator.hpp} | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) rename include/ArduinoJson/Internals/{NodeConstIterator.hpp => ListConstIterator.hpp} (66%) rename include/ArduinoJson/Internals/{NodeIterator.hpp => ListIterator.hpp} (68%) diff --git a/include/ArduinoJson/Internals/List.hpp b/include/ArduinoJson/Internals/List.hpp index 8cf5a75b..2800b681 100644 --- a/include/ArduinoJson/Internals/List.hpp +++ b/include/ArduinoJson/Internals/List.hpp @@ -6,8 +6,8 @@ #pragma once -#include "NodeIterator.hpp" -#include "NodeConstIterator.hpp" +#include "ListIterator.hpp" +#include "ListConstIterator.hpp" #include "../JsonBuffer.hpp" namespace ArduinoJson { @@ -18,8 +18,8 @@ class List { public: typedef T value_type; typedef Node node_type; - typedef NodeIterator iterator; - typedef NodeConstIterator const_iterator; + typedef ListIterator iterator; + typedef ListConstIterator const_iterator; List(JsonBuffer *buffer) : _buffer(buffer), _firstNode(NULL) {} @@ -41,4 +41,4 @@ class List { node_type *_firstNode; }; } -} \ No newline at end of file +} diff --git a/include/ArduinoJson/Internals/NodeConstIterator.hpp b/include/ArduinoJson/Internals/ListConstIterator.hpp similarity index 66% rename from include/ArduinoJson/Internals/NodeConstIterator.hpp rename to include/ArduinoJson/Internals/ListConstIterator.hpp index 6393ddfb..a4381399 100644 --- a/include/ArduinoJson/Internals/NodeConstIterator.hpp +++ b/include/ArduinoJson/Internals/ListConstIterator.hpp @@ -10,22 +10,22 @@ namespace ArduinoJson { namespace Internals { template -class NodeConstIterator { +class ListConstIterator { public: - explicit NodeConstIterator(const Node *node = NULL) : _node(node) {} + explicit ListConstIterator(const Node *node = NULL) : _node(node) {} const T &operator*() const { return _node->content; } const T *operator->() { return &_node->content; } - bool operator==(const NodeConstIterator &other) const { + bool operator==(const ListConstIterator &other) const { return _node == other._node; } - bool operator!=(const NodeConstIterator &other) const { + bool operator!=(const ListConstIterator &other) const { return _node != other._node; } - NodeConstIterator &operator++() { + ListConstIterator &operator++() { if (_node) _node = _node->next; return *this; } diff --git a/include/ArduinoJson/Internals/NodeIterator.hpp b/include/ArduinoJson/Internals/ListIterator.hpp similarity index 68% rename from include/ArduinoJson/Internals/NodeIterator.hpp rename to include/ArduinoJson/Internals/ListIterator.hpp index 22d8bb4b..5ac40b78 100644 --- a/include/ArduinoJson/Internals/NodeIterator.hpp +++ b/include/ArduinoJson/Internals/ListIterator.hpp @@ -12,22 +12,22 @@ namespace ArduinoJson { namespace Internals { template -class NodeIterator { +class ListIterator { public: - explicit NodeIterator(Node *node = NULL) : _node(node) {} + explicit ListIterator(Node *node = NULL) : _node(node) {} T &operator*() const { return _node->content; } T *operator->() { return &_node->content; } - bool operator==(const NodeIterator &other) const { + bool operator==(const ListIterator &other) const { return _node == other._node; } - bool operator!=(const NodeIterator &other) const { + bool operator!=(const ListIterator &other) const { return _node != other._node; } - NodeIterator &operator++() { + ListIterator &operator++() { if (_node) _node = _node->next; return *this; }