Browse Source

Fix param type for Window::getSize

gh-pages
falkTX 10 years ago
parent
commit
912cfbc6e0
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      dgl/Window.hpp
  2. +4
    -2
      dgl/src/Window.cpp

+ 1
- 1
dgl/Window.hpp View File

@@ -50,7 +50,7 @@ public:

int getWidth() const noexcept;
int getHeight() const noexcept;
Size<int> getSize() const noexcept;
Size<uint> getSize() const noexcept;
void setSize(uint width, uint height);

void setTitle(const char* title);


+ 4
- 2
dgl/src/Window.cpp View File

@@ -864,9 +864,11 @@ int Window::getHeight() const noexcept
return pData->fView->height;
}

Size<int> Window::getSize() const noexcept
Size<uint> Window::getSize() const noexcept
{
return Size<int>(pData->fView->width, pData->fView->height);
DISTRHO_SAFE_ASSERT_RETURN(pData->fView->width >= 0 && pData->fView->height >= 0, Size<uint>(0, 0));

return Size<uint>(pData->fView->width, pData->fView->height);
}

void Window::setSize(uint width, uint height)


Loading…
Cancel
Save