Browse Source

Use uintptr_t in getPid()

tags/1.9.4
falkTX 10 years ago
parent
commit
852295341a
4 changed files with 6 additions and 6 deletions
  1. +2
    -2
      source/backend/plugin/CarlaPluginThread.cpp
  2. +1
    -1
      source/backend/plugin/CarlaPluginThread.hpp
  3. +2
    -2
      source/backend/plugin/CarlaPluginUi.cpp
  4. +1
    -1
      source/backend/plugin/CarlaPluginUi.hpp

+ 2
- 2
source/backend/plugin/CarlaPluginThread.cpp View File

@@ -85,11 +85,11 @@ void CarlaPluginThread::setOscData(const char* const binary, const char* const l
fExtra2 = extra2; fExtra2 = extra2;
} }


ulong CarlaPluginThread::getPid() const
uintptr_t CarlaPluginThread::getPid() const
{ {
CARLA_SAFE_ASSERT_RETURN(fProcess != nullptr, 0); CARLA_SAFE_ASSERT_RETURN(fProcess != nullptr, 0);


return (ulong)fProcess->pid();
return (uintptr_t)fProcess->pid();
} }


void CarlaPluginThread::run() void CarlaPluginThread::run()


+ 1
- 1
source/backend/plugin/CarlaPluginThread.hpp View File

@@ -48,7 +48,7 @@ public:
void setMode(const CarlaPluginThread::Mode mode); void setMode(const CarlaPluginThread::Mode mode);
void setOscData(const char* const binary, const char* const label, const char* const extra1="", const char* const extra2=""); void setOscData(const char* const binary, const char* const label, const char* const extra1="", const char* const extra2="");


ulong getPid() const;
uintptr_t getPid() const;


protected: protected:
void run() override; void run() override;


+ 2
- 2
source/backend/plugin/CarlaPluginUi.cpp View File

@@ -174,7 +174,7 @@ private:


// ----------------------------------------------------- // -----------------------------------------------------


bool CarlaPluginUi::tryTransientWinIdMatch(const ulong pid, const char* const uiTitle, const uintptr_t winId)
bool CarlaPluginUi::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId)
{ {
CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true);
CARLA_SAFE_ASSERT_RETURN(winId != 0, true); CARLA_SAFE_ASSERT_RETURN(winId != 0, true);
@@ -244,7 +244,7 @@ bool CarlaPluginUi::tryTransientWinIdMatch(const ulong pid, const char* const ui
CARLA_SAFE_ASSERT_CONTINUE(status == Success); CARLA_SAFE_ASSERT_CONTINUE(status == Success);
CARLA_SAFE_ASSERT_CONTINUE(pidSize != 0); CARLA_SAFE_ASSERT_CONTINUE(pidSize != 0);


if (*(ulong*)pidData == pid)
if (*(ulong*)pidData == static_cast<ulong>(pid))
{ {
CARLA_SAFE_ASSERT_RETURN(lastGoodWindow == window || lastGoodWindow == 0, true); CARLA_SAFE_ASSERT_RETURN(lastGoodWindow == window || lastGoodWindow == 0, true);
lastGoodWindow = window; lastGoodWindow = window;


+ 1
- 1
source/backend/plugin/CarlaPluginUi.hpp View File

@@ -41,7 +41,7 @@ public:
virtual void setTransientWinId(const uintptr_t winId) = 0; virtual void setTransientWinId(const uintptr_t winId) = 0;
virtual void* getPtr() const noexcept = 0; virtual void* getPtr() const noexcept = 0;


static bool tryTransientWinIdMatch(const ulong pid, const char* const uiTitle, const uintptr_t winId);
static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId);


#ifdef CARLA_OS_MAC #ifdef CARLA_OS_MAC
static CarlaPluginUi* newCocoa(CloseCallback*, uintptr_t); static CarlaPluginUi* newCocoa(CloseCallback*, uintptr_t);


Loading…
Cancel
Save