reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit aafca0c60a725e92bf5c27c6a728368b01081bc6
parent 014f9e903476428d39a272d7de06250967b883c9
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 27 Aug 2017 13:06:31 -0700

fix Windows build

I wish the ListView win32 API used unsigned 64-bit integers for indexes so I could use size_t everywhere

Diffstat:
Msrc/about.cpp | 4++--
Msrc/browser.cpp | 2+-
Msrc/browser_entry.cpp | 2+-
Msrc/listview.cpp | 2+-
Msrc/listview.hpp | 6+++---
Msrc/manager.cpp | 2+-
6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -373,7 +373,7 @@ void AboutIndexDelegate::updateList(const int index) m_dialog->list()->reserveRows(packages->size()); for(const Package *pkg : *packages) { - size_t c = 0; + int c = 0; const Version *lastVer = pkg->lastVersion(); auto row = m_dialog->list()->createRow((void *)pkg); @@ -591,7 +591,7 @@ void AboutPackageDelegate::updateList(const int index) else actionList = "No"; - size_t c = 0; + int c = 0; auto row = m_dialog->list()->createRow((void *)src); row->setCell(c++, make_autostring(src->targetPath().join())); row->setCell(c++, make_autostring(actionList)); diff --git a/src/browser.cpp b/src/browser.cpp @@ -747,7 +747,7 @@ void Browser::updateAction(const int index) updateDisplayLabel(); } else { - m_list->row(index)->setCell(0, entry->displayState()); + m_list->row(index)->setCell(0, make_autostring(entry->displayState())); if(m_list->sortColumn() == 0) m_list->sort(); diff --git a/src/browser_entry.cpp b/src/browser_entry.cpp @@ -153,7 +153,7 @@ Remote Browser::Entry::remote() const void Browser::Entry::updateRow(const ListView::RowPtr &row) const { - size_t c = 0; + int c = 0; const Time *time = lastUpdate(); row->setCell(c++, make_autostring(displayState())); diff --git a/src/listview.cpp b/src/listview.cpp @@ -569,7 +569,7 @@ ListView::Row::Row(const size_t size, void *data, ListView *list) { } -void ListView::Row::setCell(const size_t i, const auto_string &val, void *data) +void ListView::Row::setCell(const int i, const auto_string &val, void *data) { Cell &cell = m_cells[i]; cell.value = val; diff --git a/src/listview.hpp b/src/listview.hpp @@ -63,8 +63,8 @@ public: int index() const { return m_userIndex; } - const Cell &cell(const size_t i) const { return m_cells[i]; } - void setCell(const size_t i, const auto_string &, void *data = nullptr); + const Cell &cell(const int i) const { return m_cells[i]; } + void setCell(const int i, const auto_string &, void *data = nullptr); protected: friend ListView; @@ -97,7 +97,7 @@ public: void reserveRows(size_t count) { m_rows.reserve(count); } RowPtr createRow(void *data = nullptr); - const RowPtr &row(int index) const { return m_rows[index]; } + const RowPtr &row(size_t index) const { return m_rows[index]; } void updateCell(int row, int cell); void removeRow(int index); int rowCount() const { return (int)m_rows.size(); } diff --git a/src/manager.cpp b/src/manager.cpp @@ -329,7 +329,7 @@ void Manager::refresh() if(m_uninstall.count(remote)) continue; - size_t c = 0; + int c = 0; auto row = m_list->createRow(); row->setCell(c++, make_autostring(remote.name())); row->setCell(c++, make_autostring(remote.url()));