Changeset 786 for cpp/frams/param/param.h
- Timestamp:
- 05/21/18 14:01:14 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.h
r784 r786 252 252 }; 253 253 254 template<typename T> struct quote_in_messages { constexpr static const char* value = "'"; }; 255 template<> struct quote_in_messages < SString > { constexpr static const char* value = "\""; }; 256 template<typename T> struct length_in_messages { static const bool value = false; }; 257 template<> struct length_in_messages < SString > { static const bool value = true; }; 258 254 259 class SimpleAbstractParam : public virtual ParamInterface 255 260 { … … 298 303 SString actual = get(i); 299 304 bool s_type = type(i)[0] == 's'; 300 logPrintf("Param", "set", LOG_WARN, "Setting '%s.%s = %s' exceeded allowed range (too %s). %s to %s.", 301 getName(), id(i), sstringShorten(svaluetoset, 30).c_str(), (setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted", sstringShorten(actual, 30).c_str()); 305 logPrintf("Param", "set", LOG_WARN, "Setting %s.%s = %s exceeded allowed range (too %s). %s to %s.", 306 getName(), id(i), 307 ::sstringDelimitAndShorten(svaluetoset, 30, length_in_messages<T>::value, quote_in_messages<T>::value, quote_in_messages<T>::value).c_str(), 308 (setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted", 309 ::sstringDelimitAndShorten(actual, 30, length_in_messages<T>::value, quote_in_messages<T>::value, quote_in_messages<T>::value).c_str() 310 ); 302 311 } 303 312 }
Note: See TracChangeset
for help on using the changeset viewer.