X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Fparray.hh;h=9ef9ddb2173b18f36dd6be1857ae91f615708c22;hb=1de3d397c18622b6061402fef18e625701712bc5;hp=ed120740558fa0cd1ceda63bb8ecfa24cabae87e;hpb=52102901e53611ad7bad111c2f9d414d2e593bc3;p=lilypond.git diff --git a/flower/include/parray.hh b/flower/include/parray.hh index ed12074055..9ef9ddb217 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -1,34 +1,34 @@ /* - parray.hh -- declare Pointer_array + This file is part of LilyPond, the GNU music typesetter. - source file of the Flower Library + Copyright (C) 1997--2015 Han-Wen Nienhuys - (c) 1997 Han-Wen Nienhuys -*/ + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ #ifndef PARRAY_HH #define PARRAY_HH -#include "varray.hh" +#include "std-vector.hh" + +using namespace std; template -class Pointer_array : public Array +class Link_array : public vector { -public: - int find_i (T t) const{ - for (int i=0; i < size(); i++) - if (elem(i) == t) - return i; - return -1; - } - T find_l(T t)const - { - int i = find_i(t); - if (i >= 0) - return elem(i); - else - return 0; - } + }; + #endif // PARRAY_HH +