mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 06:33:51 +00:00 
			
		
		
		
	Merge branch 'inline_stringref_convertToJson' into integration
This commit is contained in:
		| @@ -1,12 +0,0 @@ | ||||
| #include "string_ref.h" | ||||
|  | ||||
| namespace esphome { | ||||
|  | ||||
| #ifdef USE_JSON | ||||
|  | ||||
| // NOLINTNEXTLINE(readability-identifier-naming) | ||||
| void convertToJson(const StringRef &src, JsonVariant dst) { dst.set(src.c_str()); } | ||||
|  | ||||
| #endif  // USE_JSON | ||||
|  | ||||
| }  // namespace esphome | ||||
| @@ -130,7 +130,7 @@ inline std::string operator+(const StringRef &lhs, const char *rhs) { | ||||
|  | ||||
| #ifdef USE_JSON | ||||
| // NOLINTNEXTLINE(readability-identifier-naming) | ||||
| void convertToJson(const StringRef &src, JsonVariant dst); | ||||
| inline void convertToJson(const StringRef &src, JsonVariant dst) { dst.set(src.c_str()); } | ||||
| #endif  // USE_JSON | ||||
|  | ||||
| }  // namespace esphome | ||||
|   | ||||
		Reference in New Issue
	
	Block a user