On Wednesday 06 August 2003 10:33 pm, Martin Vermeer wrote: > See attached, against CVS of now. And still works :-)
Looks good. Some editorial comments below. Angus Spot the inconsistency here: +++ src/BranchList.h 6 Aug 2003 21:49:26 -0000 +// -*- C++ -*- +/** + * \file BranchList.C Also this shouldn't be in the header file. +namespace { + +class match { +public: + typedef Branch first_argument_type; + typedef string second_argument_type; + typedef bool result_type; + + bool operator()(Branch const & br, string const & s) const { + return (br.getBranch() == s); + } +}; + +} // namespace anon Place it in the .C file immediately before you use it (BranchList::remove). Change this: + BranchList() { separator_ = "|"; }; to this + BranchList() separator_("|") {} Actuallt, since you don't ever change separator_, make it static. In the .h file static string const seperator_; and in the .C file string const BranchList::seperator_ = "|"; Don't use a tab between <Branch> and List. + typedef std::list<Branch> List; In LColor.C, I think you can now get rid of those commented out pieces of history: + //Pimpl::information * in = new Pimpl::information; + /* pimpl_->*/ infotab[entry.lcolor] = in; + /* pimpl_->*/ transform[string(entry.lyxname)] = int(entry.lcolor); + ///delete pimpl_; Why the multiple tabs? +size_t LColor::size() const +{ + return pimpl_->infotab.size(); +} Yes: LColor::color LColor::getFromLyXName(string const & lyxname) const { + // should this simply become: + // return static_cast<LColor::color>(transform[lyxname]); + // ? Use <tab> to indent, not spaces: +bool ControlBranch::initialiseParams(string const & data) +{ + InsetBranchParams params; Do you need this? Index: src/frontends/xforms/Color.C +using std::setw; Indentation is off again (s/spaces/tab/): +void FormBranch::build() + bcview().setOK(dialog_->button_ok); + bcview().setApply(dialog_->button_apply); Are you particularly proud of this? ;-) +InsetBranch::~InsetBranch() // MV