clang-format

This commit is contained in:
Grégoire Roussel 2024-08-09 01:10:53 +02:00
parent 8e9c48be7b
commit 0848bb1603

View File

@ -25,11 +25,11 @@
#include "TracyFileWrite.hpp" #include "TracyFileWrite.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyProtocol.hpp"
#include "TracyProtocolServer.hpp" #include "TracyProtocolServer.hpp"
#include "TracySocket.hpp"
#include "TracySysUtil.hpp" #include "TracySysUtil.hpp"
#include "TracyWorker.hpp" #include "TracyWorker.hpp"
#include "TracyProtocol.hpp"
#include "TracySocket.hpp"
#include "tracy_lz4.hpp" #include "tracy_lz4.hpp"
#include "lib.cpp" #include "lib.cpp"
@ -285,7 +285,8 @@ struct CaptureArgs
{ {
if( args.overwrite ) if( args.overwrite )
{ {
if (args.verbose) { if( args.verbose )
{
std::cout << "Deleting " << entry.path() << std::endl; std::cout << "Deleting " << entry.path() << std::endl;
} }
std::filesystem::remove( entry ); std::filesystem::remove( entry );
@ -314,7 +315,8 @@ struct CaptureArgs
} }
else else
{ {
std::cout << "ERROR: Output file " << args.outputPath << " already exists! Use -f to force overwrite." << std::endl; std::cout << "ERROR: Output file " << args.outputPath
<< " already exists! Use -f to force overwrite." << std::endl;
exit( 4 ); exit( 4 );
} }
} }
@ -332,7 +334,8 @@ struct CaptureArgs
std::cout << "verbose " << verbose << "\n"; std::cout << "verbose " << verbose << "\n";
std::cout << "address " << address << "\n"; std::cout << "address " << address << "\n";
std::cout << "port " << port << "\n"; std::cout << "port " << port << "\n";
std::cout << "stopAfter (seconds)" << std::chrono::duration_cast<std::chrono::duration<float>>(stopAfter).count() << "\n"; std::cout << "stopAfter (seconds)"
<< std::chrono::duration_cast<std::chrono::duration<float>>( stopAfter ).count() << "\n";
std::cout << "multi " << multi << "\n"; std::cout << "multi " << multi << "\n";
} }
}; };
@ -407,7 +410,8 @@ int runCaptureSingle( CaptureArgs const& args )
printWorkerFailure( worker, "" ); printWorkerFailure( worker, "" );
printf( "\nFrames: %" PRIu64 "\nTime span: %s\nZones: %s\nElapsed time: %s\nSaving trace...", printf( "\nFrames: %" PRIu64 "\nTime span: %s\nZones: %s\nElapsed time: %s\nSaving trace...",
worker.GetFrameCount( *worker.GetFramesBase() ), tracy::TimeToString( worker.GetLastTime() - worker.GetFirstTime() ), worker.GetFrameCount( *worker.GetFramesBase() ),
tracy::TimeToString( worker.GetLastTime() - worker.GetFirstTime() ),
tracy::RealToString( worker.GetZoneCount() ), tracy::RealToString( worker.GetZoneCount() ),
tracy::TimeToString( std::chrono::duration_cast<std::chrono::nanoseconds>( t1 - t0 ).count() ) ); tracy::TimeToString( std::chrono::duration_cast<std::chrono::nanoseconds>( t1 - t0 ).count() ) );
fflush( stdout ); fflush( stdout );
@ -488,7 +492,8 @@ int runCaptureMulti( CaptureArgs const& args )
{ {
if( bcastClient.msg.protocolVersion != tracy::ProtocolVersion ) if( bcastClient.msg.protocolVersion != tracy::ProtocolVersion )
{ {
AnsiPrintf(ANSI_RED, "Rejecting client %s; bad protocol version\n", bcastClient.runtimeName().c_str()); AnsiPrintf( ANSI_RED, "Rejecting client %s; bad protocol version\n",
bcastClient.runtimeName().c_str() );
liveUpdateLines = 0; liveUpdateLines = 0;
bcastClient.status = ClientStatus::DISABLED; bcastClient.status = ClientStatus::DISABLED;
knownClients.emplace_back( std::move( bcastClient ) ); knownClients.emplace_back( std::move( bcastClient ) );