| 302 | #endif |
| 303 | |
| 304 | static operation create_op(const char* name, const char* attributes, va_list vlist) |
| 305 | { |
| 306 | std::string sattributes = attributes == nullptr ? "" : attributes; |
| 307 | std::vector<char> buffer(sattributes.size() * 2); |
| 308 | std::vsnprintf(buffer.data(), buffer.size(), sattributes.c_str(), vlist); |
| 309 | value v = value::object{}; |
| 310 | if(attributes != nullptr) |
| 311 | { |
| 312 | v = from_json_string(convert_to_json(std::string(buffer.data()))); |
| 313 | } |
| 314 | auto op = make_op(name, v); |
| 315 | |
| 316 | return op; |
| 317 | } |
| 318 | |
| 319 | #ifdef __clang__ |
| 320 | #pragma clang diagnostic pop |
nothing calls this directly
no test coverage detected