From 618dfb51d93898632830f1b87443d3f748780871 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:05:53 +0200 Subject: 3.5 --- ui/gridView.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui/gridView.h') diff --git a/ui/gridView.h b/ui/gridView.h index 8cd21915..5310eb7e 100644 --- a/ui/gridView.h +++ b/ui/gridView.h @@ -17,13 +17,13 @@ class GridView { public: //direct data access via row number - const FileSystemObject* getObject(unsigned int row) const; //returns NULL if object is not found; logarithmic complexity - FileSystemObject* getObject(unsigned int row); // + const FileSystemObject* getObject(size_t row) const; //returns NULL if object is not found; logarithmic complexity + FileSystemObject* getObject(size_t row); // size_t rowsOnView() const; //only the currently visible elements size_t rowsTotal() const; //total number of rows available //get references to FileSystemObject: no NULL-check needed! Everything's bound. - void getAllFileRef(const std::set& guiRows, std::vector& output); + void getAllFileRef(const std::set& guiRows, std::vector& output); struct StatusCmpResult { @@ -180,7 +180,7 @@ private: //inline implementation inline -const FileSystemObject* GridView::getObject(unsigned int row) const +const FileSystemObject* GridView::getObject(size_t row) const { if (row < rowsOnView()) return getReferencedRow(viewRef[row]); @@ -189,7 +189,7 @@ const FileSystemObject* GridView::getObject(unsigned int row) const } inline -FileSystemObject* GridView::getObject(unsigned int row) +FileSystemObject* GridView::getObject(size_t row) { //code re-use of const method: see Meyers Effective C++ return const_cast(static_cast(*this).getObject(row)); -- cgit