PIP_DEBUG, PIVector sort and doc

This commit is contained in:
Andrey
2022-04-13 11:22:27 +03:00
parent 00830958df
commit e4e16764f3
11 changed files with 77 additions and 41 deletions

View File

@@ -440,7 +440,7 @@ public:
}
inline PIDeque<T> & insert(size_t index, const PIDeque<T> & other) {
if (other.isEmpty()) return *this;
#ifdef USE_DEBUG
#ifdef PIP_DEBUG
if (&other == this) {
printf("error with PIDeque<%s>::insert\n", __PIP_TYPENAME__(T));
}
@@ -549,7 +549,7 @@ public:
inline PIDeque<T> & append(const T & e) {return push_back(e);}
inline PIDeque<T> & append(T && e) {return push_back(std::move(e));}
inline PIDeque<T> & append(const PIDeque<T> & v) {
#ifdef USE_DEBUG
#ifdef PIP_DEBUG
if (&v == this) {
printf("error with PIDeque<%s>::append\n", __PIP_TYPENAME__(T));
}
@@ -625,7 +625,7 @@ public:
inline PIDeque<PIDeque<T>> reshape(size_t rows, size_t cols, int order = byRow) const {
PIDeque<PIDeque<T>> ret;
if (isEmpty()) return ret;
#ifdef USE_DEBUG
#ifdef PIP_DEBUG
if (rows*cols != pid_size) {
printf("error with PIDeque<%s>::reshape\n", __PIP_TYPENAME__(T));
}
@@ -777,7 +777,7 @@ private:
if (as != pid_rsize) {
PIINTROSPECTION_CONTAINER_ALLOC(T, (as-pid_rsize))
T * p_d = (T*)(realloc((void*)(pid_data), as*sizeof(T)));
#ifdef USE_DEBUG
#ifdef PIP_DEBUG
if (!p_d) {
printf("error with PIDeque<%s>::alloc\n", __PIP_TYPENAME__(T));
}