From: Fred T. Hamster Date: Tue, 1 Jan 2013 09:06:13 +0000 (-0500) Subject: updated to clean up compiler issues with how functions were used from basis namespace; X-Git-Tag: 2.140.90~1156 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=936edc460f256ba5ddba2ad1c80e8d278b9608cc;p=feisty_meow.git updated to clean up compiler issues with how functions were used from basis namespace; wants them all to be referenced by actual namespace now. --- diff --git a/graphiq/library/geometric/math_bits.h b/graphiq/library/geometric/math_bits.h index 50c5ff43..2df27a2d 100644 --- a/graphiq/library/geometric/math_bits.h +++ b/graphiq/library/geometric/math_bits.h @@ -41,7 +41,7 @@ type. */ template bool is_floating_point(numeric_type t) { t = numeric_type(5.1); t = numeric_type(t * 3.0); - return 0.001 < float(absolute_value(numeric_type(t - 15.0))); } + return 0.001 < float(basis::absolute_value(numeric_type(t - 15.0))); } //! returns true if the instantiation type is an integer. template diff --git a/graphiq/library/geometric/point.h b/graphiq/library/geometric/point.h index 0ebda983..00ed75a8 100644 --- a/graphiq/library/geometric/point.h +++ b/graphiq/library/geometric/point.h @@ -121,7 +121,7 @@ void point::set(numeric_type x, numeric_type y) template numeric_type point::r() const { - const double sumsquar = square(x()) + square(y()); + const double sumsquar = basis::square(x()) + basis::square(y()); return numeric_type(sqrt(sumsquar)); } @@ -132,7 +132,7 @@ void point::set(numeric_type r, double_angle theta) template numeric_type point::distance(const point &p2) const { - const double sumsquar = square(p2.x() - x()) + square(p2.y() - y()); + const double sumsquar = basis::square(p2.x() - x()) + basis::square(p2.y() - y()); return numeric_type(sqrt(sumsquar)); } @@ -170,7 +170,7 @@ bool point::unpack(basis::byte_array &packed_form) template numeric_type point::magnitude() const { - const double sumsquar = square(x()) + square(y()); + const double sumsquar = basis::square(x()) + basis::square(y()); return numeric_type(sqrt(sumsquar)); } @@ -195,8 +195,8 @@ bool point::operator == (const point &arg2) const { // this bit should be part of the floating point stuff... double epsilon = 1e-10; - return (absolute_value(x() - arg2.x()) <= epsilon) - && (absolute_value(y() - arg2.y()) <= epsilon); + return (basis::absolute_value(x() - arg2.x()) <= epsilon) + && (basis::absolute_value(y() - arg2.y()) <= epsilon); } template diff --git a/graphiq/library/geometric/rectangle.h b/graphiq/library/geometric/rectangle.h index 9463652b..b63d5ae3 100644 --- a/graphiq/library/geometric/rectangle.h +++ b/graphiq/library/geometric/rectangle.h @@ -170,19 +170,19 @@ numeric_type rectangle::width() const template numeric_type rectangle::minimum_x() const -{ return minimum(_vertex_1.x(), _vertex_2.x()); } +{ return basis::minimum(_vertex_1.x(), _vertex_2.x()); } template numeric_type rectangle::minimum_y() const -{ return minimum(_vertex_1.y(), _vertex_2.y()); } +{ return basis::minimum(_vertex_1.y(), _vertex_2.y()); } template numeric_type rectangle::maximum_x() const -{ return maximum(_vertex_1.x(), _vertex_2.x()); } +{ return basis::maximum(_vertex_1.x(), _vertex_2.x()); } template numeric_type rectangle::maximum_y() const -{ return maximum(_vertex_1.y(), _vertex_2.y()); } +{ return basis::maximum(_vertex_1.y(), _vertex_2.y()); } template rectangle rectangle::order() const @@ -191,8 +191,8 @@ rectangle rectangle::order() const numeric_type x2 = _vertex_2.x(); numeric_type y1 = _vertex_1.y(); numeric_type y2 = _vertex_2.y(); - flip_increasing(x1, x2); - flip_increasing(y1, y2); + basis::flip_increasing(x1, x2); + basis::flip_increasing(y1, y2); return rectangle(x1, y1, x2, y2); } @@ -341,10 +341,10 @@ template bool rectangle::intersection(const rectangle &r2, rectangle &result) { if (disjoint(r2)) return false; - result = rectangle(maximum(minimum_x(), r2.minimum_x()), - maximum(minimum_y(), r2.minimum_y()), - minimum(maximum_x(), r2.maximum_x()), - minimum(maximum_y(), r2.maximum_y())); + result = rectangle(basis::maximum(minimum_x(), r2.minimum_x()), + basis::maximum(minimum_y(), r2.minimum_y()), + basis::minimum(maximum_x(), r2.maximum_x()), + basis::minimum(maximum_y(), r2.maximum_y())); return true; } diff --git a/graphiq/library/geometric/warper.h b/graphiq/library/geometric/warper.h index dd173bbb..7110bf06 100644 --- a/graphiq/library/geometric/warper.h +++ b/graphiq/library/geometric/warper.h @@ -208,8 +208,8 @@ rectangle rectangle_warper::flip_accordingly vertical_component vert2; separate_vertical(targo, vert2); bool flip_y = bool(vert1 != vert2); - if (flip_x) swap_values(x1, x2); - if (flip_y) swap_values(y1, y2); + if (flip_x) basis::swap_values(x1, x2); + if (flip_y) basis::swap_values(y1, y2); //LOG(basis::astring("it becomes ") + rectangle(x1, y1, x2, y2).text_form()); return rectangle(x1, y1, x2, y2); } diff --git a/nucleus/library/basis/array.h b/nucleus/library/basis/array.h index afd703e6..7deb974d 100644 --- a/nucleus/library/basis/array.h +++ b/nucleus/library/basis/array.h @@ -22,6 +22,8 @@ #include "guards.h" #include "outcome.h" +#include + #define DEBUG_ARRAY // uncomment for the noisier debugging version. diff --git a/nucleus/library/nodes/packable_tree.cpp b/nucleus/library/nodes/packable_tree.cpp index 2d8a9925..168e3500 100644 --- a/nucleus/library/nodes/packable_tree.cpp +++ b/nucleus/library/nodes/packable_tree.cpp @@ -157,7 +157,7 @@ packable_tree *packable_tree::recursive_unpack(byte_array &packed_form, // get the first command out of the package. if (!cmd.unpack(packed_form)) { //complain. - return false; + return NIL; } packable_tree *new_branch = NIL; diff --git a/nucleus/library/structures/amorph.h b/nucleus/library/structures/amorph.h index d2104c70..f35f8dba 100644 --- a/nucleus/library/structures/amorph.h +++ b/nucleus/library/structures/amorph.h @@ -370,7 +370,7 @@ basis::outcome amorph::put(int field, const contents *data) CHECK_FIELDS; bounds_return(field, 0, elements() - 1, basis::common::OUT_OF_RANGE); contents *to_whack = acquire(field); - WHACK(to_whack); + delete to_whack; if (data) { basis::array::access()[field] = (contents *)data; _fields_used++; diff --git a/nucleus/library/structures/matrix.h b/nucleus/library/structures/matrix.h index 96ec3e07..ddd73347 100644 --- a/nucleus/library/structures/matrix.h +++ b/nucleus/library/structures/matrix.h @@ -208,8 +208,8 @@ void matrix::redimension(int new_rows, int new_columns) { if ( (_rows == new_rows) && (_cols == new_columns) ) return; matrix new_this(new_rows, new_columns); - for (int r = 0; r < minimum(new_rows, rows()); r++) - for (int c = 0; c < minimum(new_columns, columns()); c++) + for (int r = 0; r < basis::minimum(new_rows, rows()); r++) + for (int c = 0; c < basis::minimum(new_columns, columns()); c++) new_this[r][c] = (*this)[r][c]; *this = new_this; } diff --git a/nucleus/library/structures/set.h b/nucleus/library/structures/set.h index 3215080f..48e7a74a 100644 --- a/nucleus/library/structures/set.h +++ b/nucleus/library/structures/set.h @@ -232,7 +232,7 @@ template bool set::add(const contents &to_add) { if (member(to_add)) return false; - concatenate(to_add); + this->concatenate(to_add); return true; }