MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / insert_indentation

Function insert_indentation

example/cacheHierarchy/fkYAML/node.hpp:11055–11061  ·  view source on GitHub ↗

@brief Insert indentation to the serialization result. @param indent The indent width to be inserted. @param str A string to hold serialization result.

Source from the content-addressed store, hash-verified

11053 /// @param indent The indent width to be inserted.
11054 /// @param str A string to hold serialization result.
11055 void insert_indentation(const uint32_t indent, std::string& str) const noexcept {
11056 if (indent == 0) {
11057 return;
11058 }
11059
11060 str.append(indent - get_cur_indent(str), ' ');
11061 }
11062
11063 /// @brief Append an anchor property if it's available. Do nothing otherwise.
11064 /// @param node The target node which is possibly an anchor node.

Callers 1

serialize_nodeFunction · 0.85

Calls 1

get_cur_indentFunction · 0.85

Tested by

no test coverage detected