Merge branch 'master' of https://git.shs.tools/SHS/pip
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
template <typename T>
|
||||
class PIVector {
|
||||
public:
|
||||
typedef bool (*CompareFunc)(const T & , const T & );
|
||||
|
||||
//! \~\brief
|
||||
//! \~english Constructs an empty vector.
|
||||
@@ -1200,7 +1201,7 @@ public:
|
||||
//! \~\sa \a append(), \a prepend(), \a remove()
|
||||
inline PIVector<T> & insert(size_t index, const PIVector<T> & v) {
|
||||
if (v.isEmpty()) return *this;
|
||||
#ifdef PIP_DEBUG
|
||||
#ifndef NDEBUG
|
||||
if (&v == this) {
|
||||
printf("error with PIVector<%s>::insert\n", __PIP_TYPENAME__(T));
|
||||
}
|
||||
@@ -1494,7 +1495,7 @@ public:
|
||||
//! \~russian Перегруженая функция.
|
||||
//! \~\sa \a push_back()
|
||||
inline PIVector<T> & push_back(const PIVector<T> & v) {
|
||||
#ifdef PIP_DEBUG
|
||||
#ifndef NDEBUG
|
||||
if (&v == this) {
|
||||
printf("error with PIVector<%s>::push_back\n", __PIP_TYPENAME__(T));
|
||||
}
|
||||
@@ -1678,7 +1679,7 @@ public:
|
||||
inline PIVector<PIVector<T>> reshape(size_t rows, size_t cols, ReshapeOrder order = byRow) const {
|
||||
PIVector<PIVector<T>> ret;
|
||||
if (isEmpty()) return ret;
|
||||
#ifdef PIP_DEBUG
|
||||
#ifndef NDEBUG
|
||||
if (rows*cols != piv_size) {
|
||||
printf("error with PIVector<%s>::reshape\n", __PIP_TYPENAME__(T));
|
||||
}
|
||||
@@ -1807,7 +1808,7 @@ private:
|
||||
if (as == piv_rsize) return;
|
||||
PIINTROSPECTION_CONTAINER_ALLOC(T, (as-piv_rsize))
|
||||
T * p_d = (T*)(realloc((void*)(piv_data), as*sizeof(T)));
|
||||
#ifdef PIP_DEBUG
|
||||
#ifndef NDEBUG
|
||||
if (!p_d) {
|
||||
printf("error with PIVector<%s>::alloc\n", __PIP_TYPENAME__(T));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user