From 0558244645611f314f47e0fa427f7323ce253eaf Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 7 Sep 2020 12:57:04 +0200 Subject: remove external libraries from main branch --- .../lib/ArduinoJson/StringTraits/ArduinoStream.hpp | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 include/lib/ArduinoJson/StringTraits/ArduinoStream.hpp (limited to 'include/lib/ArduinoJson/StringTraits/ArduinoStream.hpp') diff --git a/include/lib/ArduinoJson/StringTraits/ArduinoStream.hpp b/include/lib/ArduinoJson/StringTraits/ArduinoStream.hpp deleted file mode 100644 index 5db0852..0000000 --- a/include/lib/ArduinoJson/StringTraits/ArduinoStream.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// ArduinoJson - arduinojson.org -// Copyright Benoit Blanchon 2014-2018 -// MIT License - -#pragma once - -#if ARDUINOJSON_ENABLE_ARDUINO_STREAM - -#include - -namespace ArduinoJson { -namespace Internals { - -struct ArduinoStreamTraits { - class Reader { - Stream& _stream; - char _current, _next; - - public: - Reader(Stream& stream) : _stream(stream), _current(0), _next(0) {} - - void move() { - _current = _next; - _next = 0; - } - - char current() { - if (!_current) _current = read(); - return _current; - } - - char next() { - // assumes that current() has been called - if (!_next) _next = read(); - return _next; - } - - private: - char read() { - // don't use _stream.read() as it ignores the timeout - char c = 0; - _stream.readBytes(&c, 1); - return c; - } - }; - - static const bool has_append = false; - static const bool has_equals = false; -}; - -template -struct StringTraits< - TStream, - // match any type that is derived from Stream: - typename EnableIf< - IsBaseOf::type>::value>::type> - : ArduinoStreamTraits {}; -} -} - -#endif -- cgit v1.2.3