PIVector2D fix

git-svn-id: svn://db.shs.com.ru/pip@800 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2019-06-11 13:52:56 +00:00
parent 477c9dc256
commit 1d0ccd3152
3 changed files with 7 additions and 2 deletions

View File

@@ -185,6 +185,7 @@ public:
return *this;
}
inline PIVector2D<T> & addRow(const Row & other) {
if (cols_ == 0) cols_ = other.sz_;
size_t sz = piMin<size_t>(cols_, other.sz_);
size_t ps = mat.size();
mat.resize(mat.size() + cols_);
@@ -193,6 +194,7 @@ public:
return *this;
}
inline PIVector2D<T> & addRow(const RowConst & other) {
if (cols_ == 0) cols_ = other.sz_;
size_t sz = piMin<size_t>(cols_, other.sz_);
size_t ps = mat.size();
mat.resize(mat.size() + cols_);
@@ -201,6 +203,7 @@ public:
return *this;
}
inline PIVector2D<T> & addRow(const PIVector<T> & other) {
if (cols_ == 0) cols_ = other.size();
size_t sz = piMin<size_t>(cols_, other.size());
size_t ps = mat.size();
mat.resize(mat.size() + cols_);