mirror of
				https://github.com/bblanchon/ArduinoJson.git
				synced 2025-10-30 22:21:38 +01:00 
			
		
		
		
	Store static strings in a dedicated pool
Because a slot id is smaller than a pointer, this change will ultimately allow reducing the slot size.
This commit is contained in:
		| @@ -22,10 +22,10 @@ TEST_CASE("JsonDocument::remove()") { | ||||
|  | ||||
|   SECTION("string literal") { | ||||
|     doc["a"] = 1; | ||||
|     doc["a\0b"_s] = 2; | ||||
|     doc["x"] = 2; | ||||
|     doc["b"] = 3; | ||||
|  | ||||
|     doc.remove("a\0b"); | ||||
|     doc.remove("x"); | ||||
|  | ||||
|     REQUIRE(doc.as<std::string>() == "{\"a\":1,\"b\":3}"); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user