From 2a47fc56e4faa23ea0ef845fbf21556cf814d673 Mon Sep 17 00:00:00 2001 From: koldo Date: Sat, 19 Dec 2020 14:08:54 +0000 Subject: [PATCH] plugin/matio: Added size() git-svn-id: svn://ultimatepp.org/upp/trunk@15610 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/plugin/matio/matio.h | 11 ++++++----- bazaar/plugin/matio/matio.upp | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bazaar/plugin/matio/matio.h b/bazaar/plugin/matio/matio.h index aae01f191..cdc70ee09 100644 --- a/bazaar/plugin/matio/matio.h +++ b/bazaar/plugin/matio/matio.h @@ -59,12 +59,13 @@ public: const T &operator()(int r) const {return data[r];} const T &operator()(int r, int c) const {return data[c*rows + r];} - operator T*() { return data; } - operator const T*() const { return data; } + operator T*() {return data;} + operator const T*() const {return data;} - int GetCount() {return rows*cols;} - int GetRows() {return rows;} - int GetCols() {return cols;} + int GetCount() const {return rows*cols;} + int size() const {return GetCount();} + int GetRows() const {return rows;} + int GetCols() const {return cols;} void Print() { for(int r = 0; r < GetRows(); r++) { diff --git a/bazaar/plugin/matio/matio.upp b/bazaar/plugin/matio/matio.upp index c7cbda021..05851ac7b 100644 --- a/bazaar/plugin/matio/matio.upp +++ b/bazaar/plugin/matio/matio.upp @@ -1,5 +1,7 @@ description "MATLAB MAT file I/O library\3770,128,128"; +options(BUILDER_OPTION) NOWARNINGS; + uses Core;