diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index a7745a10cc..fb9ac18406 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -456,7 +456,7 @@ static void UpdateBroadcastClients() auto parsedMessageOpt = tracy::ParseBroadcastMessage(msg, len); if (parsedMessageOpt.has_value()) { - auto parsedMessage = parsedMessageOpt.value(); + auto parsedMessage = parsedMessageOpt.value(); auto address = addr.GetText(); const auto clientId = tracy::ClientUniqueID(addr, parsedMessage.listenPort); const auto ipNumerical = addr.GetNumber(); @@ -478,16 +478,24 @@ static void UpdateBroadcastClients() } ); } resolvLock.unlock(); - clients.emplace( clientId, ClientData { time, parsedMessage.protocolVersion, parsedMessage.activeTime, parsedMessage.listenPort, parsedMessage.pid, parsedMessage.programName, std::move( ip ) } ); + clients.emplace(clientId, + ClientData{time, + parsedMessage.protocolVersion, + parsedMessage.activeTime, + parsedMessage.listenPort, + parsedMessage.pid, + parsedMessage.programName, + std::move(ip)}); } else { it->second.time = time; - it->second.activeTime = parsedMessage.activeTime; - it->second.port = parsedMessage.listenPort; - it->second.pid = parsedMessage.pid; + it->second.activeTime = parsedMessage.activeTime; + it->second.port = parsedMessage.listenPort; + it->second.pid = parsedMessage.pid; it->second.protocolVersion = parsedMessage.protocolVersion; - if( strcmp( it->second.procName.c_str(), parsedMessage.programName ) != 0 ) it->second.procName = parsedMessage.programName; + if (strcmp(it->second.procName.c_str(), parsedMessage.programName) != 0) + it->second.procName = parsedMessage.programName; } } else if( it != clients.end() ) diff --git a/public/common/TracySocket.cpp b/public/common/TracySocket.cpp index 64567296a3..25ee062402 100644 --- a/public/common/TracySocket.cpp +++ b/public/common/TracySocket.cpp @@ -651,7 +651,7 @@ void IpAddress::Set( const struct sockaddr& addr ) #else auto ai = (const struct sockaddr_in*)&addr; #endif - inet_ntop( AF_INET, &ai->sin_addr, m_text, TEXT_SIZE ); + inet_ntop(AF_INET, &ai->sin_addr, m_text, TEXT_SIZE); m_number = ai->sin_addr.s_addr; } diff --git a/server/TracyProtocolServer.cpp b/server/TracyProtocolServer.cpp index 749feef26c..816e92fb00 100644 --- a/server/TracyProtocolServer.cpp +++ b/server/TracyProtocolServer.cpp @@ -104,4 +104,4 @@ uint64_t ClientUniqueID(tracy::IpAddress const& addr, uint16_t port) { return uint64_t(addr.GetNumber()) | (uint64_t(port) << 32); } -} +} // namespace tracy diff --git a/server/TracyProtocolServer.hpp b/server/TracyProtocolServer.hpp index 53e53436df..09f5457d10 100644 --- a/server/TracyProtocolServer.hpp +++ b/server/TracyProtocolServer.hpp @@ -12,6 +12,6 @@ namespace tracy std::optional ParseBroadcastMessage(const char* msg, size_t msgLen); // internal unique ID for a client uint64_t ClientUniqueID(tracy::IpAddress const& addr, uint16_t port); -} +} // namespace tracy #endif