MCPcopy Create free account
hub / github.com/ETLCPP/etl / FormatToStream

Function FormatToStream

test/UnitTest++/MemoryOutStream.cpp:62–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61 template<typename ValueType>
62 void FormatToStream(MemoryOutStream& stream, char const* format, ValueType const& value)
63 {
64 using namespace std;
65
66 const size_t BUFFER_SIZE=32;
67 char txt[BUFFER_SIZE];
68 snprintf(txt, BUFFER_SIZE, format, value);
69 stream << txt;
70 }
71
72 int RoundUpToMultipleOfPow2Number (int n, int pow2Number)
73 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected