mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Mark adapter's storagePolicy() as const
				
					
				
			This commit is contained in:
		| @@ -61,7 +61,7 @@ class FlashString { | ||||
|     ::memcpy_P(p, s._str, n); | ||||
|   } | ||||
|  | ||||
|   StringStoragePolicy::Copy storagePolicy() { | ||||
|   StringStoragePolicy::Copy storagePolicy() const { | ||||
|     return StringStoragePolicy::Copy(); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -15,7 +15,7 @@ class JsonStringAdapter : public SizedRamString { | ||||
|   JsonStringAdapter(const JsonString& s) | ||||
|       : SizedRamString(s.c_str(), s.size()), _linked(s.isLinked()) {} | ||||
|  | ||||
|   StringStoragePolicy::LinkOrCopy storagePolicy() { | ||||
|   StringStoragePolicy::LinkOrCopy storagePolicy() const { | ||||
|     StringStoragePolicy::LinkOrCopy policy = {_linked}; | ||||
|     return policy; | ||||
|   } | ||||
|   | ||||
| @@ -53,7 +53,7 @@ class ZeroTerminatedRamString { | ||||
|     return stringCompare(a, b) == 0; | ||||
|   } | ||||
|  | ||||
|   StringStoragePolicy::Copy storagePolicy() { | ||||
|   StringStoragePolicy::Copy storagePolicy() const { | ||||
|     return StringStoragePolicy::Copy(); | ||||
|   } | ||||
|  | ||||
| @@ -83,7 +83,7 @@ class StaticStringAdapter : public ZeroTerminatedRamString { | ||||
|  public: | ||||
|   StaticStringAdapter(const char* str) : ZeroTerminatedRamString(str) {} | ||||
|  | ||||
|   StringStoragePolicy::Link storagePolicy() { | ||||
|   StringStoragePolicy::Link storagePolicy() const { | ||||
|     return StringStoragePolicy::Link(); | ||||
|   } | ||||
| }; | ||||
| @@ -121,7 +121,7 @@ class SizedRamString { | ||||
|     return _str; | ||||
|   } | ||||
|  | ||||
|   StringStoragePolicy::Copy storagePolicy() { | ||||
|   StringStoragePolicy::Copy storagePolicy() const { | ||||
|     return StringStoragePolicy::Copy(); | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user