1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Ports are uint16_t.

This commit is contained in:
Bartosz Taudul
2020-10-02 18:51:54 +02:00
parent 0d82d6fe63
commit b6724bec3a
9 changed files with 38 additions and 37 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ enum { MinFrameSize = 5 };
static View* s_instance = nullptr;
View::View( void(*cbMainThread)(std::function<void()>), const char* addr, int port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, GetWindowCallback gwcb )
View::View( void(*cbMainThread)(std::function<void()>), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, GetWindowCallback gwcb )
: m_worker( addr, port )
, m_staticView( false )
, m_viewMode( ViewMode::LastFrames )
+2 -2
View File
@@ -76,7 +76,7 @@ public:
using GetWindowCallback = void*(*)();
View( void(*cbMainThread)(std::function<void()>), ImFont* fixedWidth = nullptr, ImFont* smallFont = nullptr, ImFont* bigFont = nullptr, SetTitleCallback stcb = nullptr, GetWindowCallback gwcb = nullptr ) : View( cbMainThread, "127.0.0.1", 8086, fixedWidth, smallFont, bigFont, stcb, gwcb ) {}
View( void(*cbMainThread)(std::function<void()>), const char* addr, int port, ImFont* fixedWidth = nullptr, ImFont* smallFont = nullptr, ImFont* bigFont = nullptr, SetTitleCallback stcb = nullptr, GetWindowCallback gwcb = nullptr );
View( void(*cbMainThread)(std::function<void()>), const char* addr, uint16_t port, ImFont* fixedWidth = nullptr, ImFont* smallFont = nullptr, ImFont* bigFont = nullptr, SetTitleCallback stcb = nullptr, GetWindowCallback gwcb = nullptr );
View( void(*cbMainThread)(std::function<void()>), FileRead& f, ImFont* fixedWidth = nullptr, ImFont* smallFont = nullptr, ImFont* bigFont = nullptr, SetTitleCallback stcb = nullptr, GetWindowCallback gwcb = nullptr );
~View();
@@ -89,7 +89,7 @@ public:
bool ReconnectRequested() const { return m_reconnectRequested; }
std::string GetAddress() const { return m_worker.GetAddr(); }
int GetPort() const { return m_worker.GetPort(); }
uint16_t GetPort() const { return m_worker.GetPort(); }
const char* SourceSubstitution( const char* srcFile ) const;
+1 -1
View File
@@ -234,7 +234,7 @@ static tracy_force_inline void UpdateLockRange( LockMap& lockmap, const LockEven
LoadProgress Worker::s_loadProgress;
Worker::Worker( const char* addr, int port )
Worker::Worker( const char* addr, uint16_t port )
: m_addr( addr )
, m_port( port )
, m_hasData( false )
+3 -3
View File
@@ -392,13 +392,13 @@ public:
NUM_FAILURES
};
Worker( const char* addr, int port );
Worker( const char* addr, uint16_t port );
Worker( const std::string& program, const std::vector<ImportEventTimeline>& timeline, const std::vector<ImportEventMessages>& messages, const std::vector<ImportEventPlots>& plots );
Worker( FileRead& f, EventType::Type eventMask = EventType::All, bool bgTasks = true );
~Worker();
const std::string& GetAddr() const { return m_addr; }
int GetPort() const { return m_port; }
uint16_t GetPort() const { return m_port; }
const std::string& GetCaptureName() const { return m_captureName; }
const std::string& GetCaptureProgram() const { return m_captureProgram; }
uint64_t GetCaptureTime() const { return m_captureTime; }
@@ -816,7 +816,7 @@ private:
Socket m_sock;
std::string m_addr;
int m_port;
uint16_t m_port;
std::thread m_thread;
std::thread m_threadNet;