Explorar el Código

Fixed creation of JsonVariant::_invalid

Benoit Blanchon hace 11 años
padre
commit
9d2ee6ce63
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      include/ArduinoJson/JsonVariant.hpp

+ 3 - 0
include/ArduinoJson/JsonVariant.hpp

@@ -166,6 +166,9 @@ class JsonVariant : public Internals::JsonPrintable<JsonVariant> {
   JsonVariant &operator[](const char *key);
 
  private:
+  // Special constructor used only to create _invalid.
+  JsonVariant(Internals::JsonVariantType type) : _type(type) {}
+
   // Helper for interger cast operators
   template <typename T>
   T cast_long_to() const {