mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Clang-Format: set AllowShortLoopsOnASingleLine to false
				
					
				
			This commit is contained in:
		| @@ -23,7 +23,8 @@ class IteratorReader { | ||||
|  | ||||
|   size_t readBytes(char* buffer, size_t length) { | ||||
|     size_t i = 0; | ||||
|     while (i < length && _ptr < _end) buffer[i++] = *_ptr++; | ||||
|     while (i < length && _ptr < _end) | ||||
|       buffer[i++] = *_ptr++; | ||||
|     return i; | ||||
|   } | ||||
| }; | ||||
|   | ||||
| @@ -32,7 +32,8 @@ struct Reader<TSource*, | ||||
|   } | ||||
|  | ||||
|   size_t readBytes(char* buffer, size_t length) { | ||||
|     for (size_t i = 0; i < length; i++) buffer[i] = *_ptr++; | ||||
|     for (size_t i = 0; i < length; i++) | ||||
|       buffer[i] = *_ptr++; | ||||
|     return length; | ||||
|   } | ||||
| }; | ||||
|   | ||||
| @@ -64,7 +64,8 @@ class PrettyJsonSerializer : public JsonSerializer<TWriter> { | ||||
|  | ||||
|  private: | ||||
|   void indent() { | ||||
|     for (uint8_t i = 0; i < _nesting; i++) base::write(ARDUINOJSON_TAB); | ||||
|     for (uint8_t i = 0; i < _nesting; i++) | ||||
|       base::write(ARDUINOJSON_TAB); | ||||
|   } | ||||
|  | ||||
|   uint8_t _nesting; | ||||
|   | ||||
| @@ -37,14 +37,16 @@ class TextFormatter { | ||||
|   void writeString(const char* value) { | ||||
|     ARDUINOJSON_ASSERT(value != NULL); | ||||
|     writeRaw('\"'); | ||||
|     while (*value) writeChar(*value++); | ||||
|     while (*value) | ||||
|       writeChar(*value++); | ||||
|     writeRaw('\"'); | ||||
|   } | ||||
|  | ||||
|   void writeString(const char* value, size_t n) { | ||||
|     ARDUINOJSON_ASSERT(value != NULL); | ||||
|     writeRaw('\"'); | ||||
|     while (n--) writeChar(*value++); | ||||
|     while (n--) | ||||
|       writeChar(*value++); | ||||
|     writeRaw('\"'); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -183,7 +183,8 @@ class MemoryPool { | ||||
|         return next; | ||||
|  | ||||
|       // jump to next terminator | ||||
|       while (*next) ++next; | ||||
|       while (*next) | ||||
|         ++next; | ||||
|     } | ||||
|     return 0; | ||||
|   } | ||||
|   | ||||
| @@ -23,7 +23,8 @@ struct pgm_p { | ||||
| inline size_t strlen_P(ARDUINOJSON_NAMESPACE::pgm_p s) { | ||||
|   const char* p = s.address; | ||||
|   ARDUINOJSON_ASSERT(p != NULL); | ||||
|   while (pgm_read_byte(p)) p++; | ||||
|   while (pgm_read_byte(p)) | ||||
|     p++; | ||||
|   return size_t(p - s.address); | ||||
| } | ||||
| #endif | ||||
|   | ||||
| @@ -27,11 +27,13 @@ class StringCopier { | ||||
|   } | ||||
|  | ||||
|   void append(const char* s) { | ||||
|     while (*s) append(*s++); | ||||
|     while (*s) | ||||
|       append(*s++); | ||||
|   } | ||||
|  | ||||
|   void append(const char* s, size_t n) { | ||||
|     while (n-- > 0) append(*s++); | ||||
|     while (n-- > 0) | ||||
|       append(*s++); | ||||
|   } | ||||
|  | ||||
|   void append(char c) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user