Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Jacob <benoitjacob@google.com>2022-04-12 23:36:08 +0300
committerBenoit Jacob <benoitjacob@google.com>2022-04-12 23:36:08 +0300
commit10ad96c29ece820971efb30991c829cb73f55f58 (patch)
tree91909eb03157d3edb44daa8172bb1f2bbe939950 /capture
parent92fdf12e0534cd021114c26574714ab3251f67af (diff)
4-space indent
Diffstat (limited to 'capture')
-rw-r--r--capture/src/capture.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/capture/src/capture.cpp b/capture/src/capture.cpp
index 81c6ff20..528d3fc6 100644
--- a/capture/src/capture.cpp
+++ b/capture/src/capture.cpp
@@ -68,24 +68,24 @@ bool IsStdoutATerminal() { return s_isStdoutATerminal; }
// Like printf, but if stdout is a terminal, prepends the output with
// the given `ansiEscape` and appends ANSI_RESET.
void AnsiPrintf( const char* ansiEscape, const char* format, ... ) {
- if( IsStdoutATerminal() )
- {
- // Prepend ansiEscape and append ANSI_RESET.
- char buf[256];
- va_list args;
- va_start( args, format );
- vsnprintf( buf, sizeof buf, format, args );
- va_end( args );
- printf( "%s%s" ANSI_RESET, ansiEscape, buf );
- }
- else
- {
- // Just a normal printf.
- va_list args;
- va_start( args, format );
- vfprintf( stdout, format, args );
- va_end( args );
- }
+ if( IsStdoutATerminal() )
+ {
+ // Prepend ansiEscape and append ANSI_RESET.
+ char buf[256];
+ va_list args;
+ va_start( args, format );
+ vsnprintf( buf, sizeof buf, format, args );
+ va_end( args );
+ printf( "%s%s" ANSI_RESET, ansiEscape, buf );
+ }
+ else
+ {
+ // Just a normal printf.
+ va_list args;
+ va_start( args, format );
+ vfprintf( stdout, format, args );
+ va_end( args );
+ }
}
[[noreturn]] void Usage()