From 7b6ea5917a829f0e585d00b9c1e39ec1d6e36741 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 15 Nov 1996 10:08:37 +0000 Subject: [PATCH] flower-1.0.6 --- flower/matrix.cc | 2 -- flower/string.hh | 1 + flower/vector.cc | 5 +++-- flower/vray.hh | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/flower/matrix.cc b/flower/matrix.cc index 1afe5951c8..b95a4ab1f9 100644 --- a/flower/matrix.cc +++ b/flower/matrix.cc @@ -1,6 +1,4 @@ #include "matrix.hh" -#include "string.hh" - Real Matrix::norm() const diff --git a/flower/string.hh b/flower/string.hh index d3d2774261..77912beda2 100644 --- a/flower/string.hh +++ b/flower/string.hh @@ -50,6 +50,7 @@ public: char *copy_array() const; // return a "new"-ed copy of contents const char *ptr() const; + const char *ptr() { return ((const String *)this)->ptr(); } /// return the data. Don't use for writing the data. operator const char *() const { return ptr(); } diff --git a/flower/vector.cc b/flower/vector.cc index 2cbfdfc899..bb3008ee5e 100644 --- a/flower/vector.cc +++ b/flower/vector.cc @@ -1,5 +1,4 @@ #include "vector.hh" -#include "string.hh" Vector::Vector(const Vector&n) :dat(n.dat) @@ -9,7 +8,9 @@ Vector::Vector(const Vector&n) Vector Vector::operator-() const { - Vector v(*this); v*=-1; return v; + Vector v(*this); + v*=-1; + return v; } void diff --git a/flower/vray.hh b/flower/vray.hh index d56cad00d6..c03e651034 100644 --- a/flower/vray.hh +++ b/flower/vray.hh @@ -141,6 +141,11 @@ public: sort(compare, lower, last-1); sort(compare, last+1, lower); } + void concat(svec const &src) { + int s = size; + set_size(size + src.size); + arrcpy(thearray+s,src.thearray, src.size); + } }; /** -- 2.39.5