X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fmatrix-debug.cc;h=d47d019367a36a833bb73e6df15e91cc05352fac;hb=1cf3d59c1559fb9774c4c1c8cae155cfe54a927c;hp=82080f2a6d8a560930ba15498a5ef22c4bbc99d1;hpb=1e95a0be01466d1c98644f7705c8e07e41cc645c;p=lilypond.git diff --git a/flower/matrix-debug.cc b/flower/matrix-debug.cc index 82080f2a6d..d47d019367 100644 --- a/flower/matrix-debug.cc +++ b/flower/matrix-debug.cc @@ -3,24 +3,25 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "flower-debug.hh" #include "matrix.hh" -Matrix::operator String() const +String +Matrix::str () const { String s; #ifndef NPRINT Full_storage const * stor_c_l = dat_; - s=String ("matrix {"); + s = String ("matrix {"); for (int i=0; i< rows(); i++) { for (int j = 0; j < cols(); j++) { - s+= String (stor_c_l->elem (i,j), "%6f "); + s+= to_str (stor_c_l->elem (i,j), "%6f "); } s+="\n"; } @@ -31,23 +32,24 @@ Matrix::operator String() const void -Matrix::print() const +Matrix::print () const { #ifndef NPRINT fdebug << *this; #endif } -Vector::operator String() const +String +Vector::str () const { String s; #ifndef NPRINT - s=String ("vector (") + dim () + ") ["; + s = String ("vector (") + to_str (dim ()) + ") ["; for (int i=0; i < dim(); i++) { - s += String (dat[i], "%6f") + String (' '); + s += to_str (dat[i], "%6f") + to_str (' '); } - s+="]\n"; + s += "]\n"; #endif return s; } @@ -57,6 +59,6 @@ void Vector::print() const { #ifndef NDEBUG - fdebug << *this<<'\n'; + fdebug << *this << '\n'; #endif }