Implement runtime precision.
This commit is contained in:
@@ -244,6 +244,7 @@ class Formatter {
|
||||
internal::Array<const Arg*, NUM_INLINE_ARGS> args_; // Format arguments.
|
||||
|
||||
const char *format_; // Format string.
|
||||
int num_open_braces_;
|
||||
|
||||
friend class internal::ArgInserter;
|
||||
|
||||
@@ -251,6 +252,8 @@ class Formatter {
|
||||
args_.push_back(&arg);
|
||||
}
|
||||
|
||||
void ReportError(const char *s, const std::string &message) const;
|
||||
|
||||
// Formats an integer.
|
||||
template <typename T>
|
||||
void FormatInt(T value, unsigned flags, int width, char type);
|
||||
@@ -264,6 +267,11 @@ class Formatter {
|
||||
template <typename T>
|
||||
void FormatCustomArg(const void *arg, int width);
|
||||
|
||||
unsigned ParseUInt(const char *&s) const;
|
||||
|
||||
// Parses argument index and returns an argument with this index.
|
||||
const Arg &ParseArgIndex(const char *&s) const;
|
||||
|
||||
void DoFormat();
|
||||
|
||||
void Format() {
|
||||
|
||||
Reference in New Issue
Block a user