MCPcopy Create free account
hub / github.com/chen3feng/toft / Write

Method Write

base/string/format/print_arg.cpp:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130int PrintValueWriter<bool>::Write(FormatPrintTarget* target,
131 const PrintSpecification& spec,
132 const bool* value)
133{
134 if (!spec.SpecifierMatch('b')) {
135 LOG(DFATAL) << "Invalid print specifier '" << spec.specifier
136 << "' for bool type";
137 return 0;
138 }
139 if (*value)
140 return WriteString(target, spec, "true", 4);
141 else
142 return WriteString(target, spec, "false", 5);
143}
144
145int PrintValueWriter<char>::Write(FormatPrintTarget* target,
146 const PrintSpecification& spec,

Callers 1

VFormatPrintFunction · 0.45

Calls 7

WriteStringFunction · 0.85
WriteVoidPtrFunction · 0.85
WriteFloatFunction · 0.85
SpecifierMatchMethod · 0.80
has_precisionMethod · 0.80
dataMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected