X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fstructures%2Famorph.h;h=6d817e8aeb4ab93320fc0788a333815b5df5ccb2;hb=2e27570475859bacfbe74dfb14ab2c295f016df6;hp=9ffdad8cb7d8872b29be396fe1e64f84f7461902;hpb=9584756d1c52082806a715e8d823e763031d79f3;p=feisty_meow.git diff --git a/nucleus/library/structures/amorph.h b/nucleus/library/structures/amorph.h index 9ffdad8c..6d817e8a 100644 --- a/nucleus/library/structures/amorph.h +++ b/nucleus/library/structures/amorph.h @@ -76,9 +76,12 @@ public: index "new_maximum" and upwards are thrown away. existing fields are kept. */ - void reset(int new_maximum = 0); + void resize(int new_maximum = 0); //!< like adjust but doesn't keep existing contents. + void reset() { this->resize(0); } + //!< cleans out all of the contents. + basis::outcome put(int field, const contents *data); //!< Enters an object into the field at index "field" in the amorph. /*!< If "data" is NIL, then the field is cleared. The amorph considers the @@ -280,7 +283,7 @@ void amorph::check_fields(const char *where) const } template -void amorph::reset(int new_maximum) +void amorph::resize(int new_maximum) { FUNCDEF("reset"); CHECK_FIELDS;