On Fri, Feb 22, 2008 at 10:58:29PM -0500, rgheck wrote: > Index: src/insets/InsetCommandParams.cpp > =================================================================== > --- src/insets/InsetCommandParams.cpp (revision 23025) > +++ src/insets/InsetCommandParams.cpp (working copy) > @@ -42,14 +42,63 @@ > > namespace lyx { > > +ParamInfo::ParamData::ParamData(std::string const & s, bool b) : > + name_(s), optional_(b)
ParamInfo::ParamData::ParamData(std::string const & s, bool b) : name_(s), optional_(b) {} > + //if they both end together, return true A space after // pleast. > +class ParamInfo { > +public: > + /// > + class ParamData { > + // No parameter may be named "preview", because that is a required > + // flag for all commands. > + public: > + /// > + ParamData(std::string const &, bool); > + /// > + std::string name() const { return name_; } > + /// > + bool isOptional() const { return optional_; } > + /// > + bool operator==(ParamData const &) const; > + /// > + bool operator!=(ParamData const & rhs) const > + { return !(*this == rhs); } > + private: > + /// > + ParamData() {}; //don't allow any other construction The default constructor is not auto-generated as soon as any other contructor is manually created. So this line is not needed. > + /// adds a new parameter > + void add(std::string const & name, bool optional); > + /// > + bool empty() const { return info_.empty(); } > + /// > + size_t size() const { return info_.size(); } > + /// > + typedef std::vector<ParamData>::const_iterator const_iterator; > + /// > + const_iterator const begin() const { return info_.begin(); } Drop the 'const' in front of the begin. It's mostly useless, and some compilers would complain in case of std::vector<>::const_iterator is implemented as a simple pointer. Rest looks ok. Andre'