Op 15-3-2011 14:27, sp...@lyx.org schreef:
Author: spitz
Date: Tue Mar 15 14:27:08 2011
New Revision: 37935
URL: http://www.lyx.org/trac/changeset/37935

Log:
typos in comments.

Modified:
    lyx-devel/trunk/src/insets/InsetSpace.h
    lyx-devel/trunk/src/insets/InsetSpecialChar.h

Modified: lyx-devel/trunk/src/insets/InsetSpace.h
==============================================================================
--- lyx-devel/trunk/src/insets/InsetSpace.h     Tue Mar 15 14:19:55 2011        
(r37934)
+++ lyx-devel/trunk/src/insets/InsetSpace.h     Tue Mar 15 14:27:08 2011        
(r37935)
@@ -140,7 +140,7 @@
        /// is this an expandible space (rubber length)?
        bool isStretchableSpace() const;

-       // should this inset be handled like a normal charater
+       /// should this inset be handled like a normal character?
        bool isChar() const { return true; }
        /// is this equivalent to a letter?
        bool isLetter() const { return false; }

Modified: lyx-devel/trunk/src/insets/InsetSpecialChar.h
==============================================================================
--- lyx-devel/trunk/src/insets/InsetSpecialChar.h       Tue Mar 15 14:19:55 
2011        (r37934)
+++ lyx-devel/trunk/src/insets/InsetSpecialChar.h       Tue Mar 15 14:27:08 
2011        (r37935)
@@ -77,7 +77,7 @@
        ///
        void validate(LaTeXFeatures&) const;

-       /// should this inset be handled like a normal charater
+       /// should this inset be handled like a normal character?
        bool isChar() const { return true; }
        /// is this equivalent to a letter?
        bool isLetter() const;


It's not necessary to comment these functions. It might even be better not to. If one decides to improve the documentation, one doesn't want to search the whole project for places where this function is overriden just to adapt the documentation. Also, this may lead to different documentation at different locations. Last, there is no way to see that this function is defined in Inset.h.

I've restyled a part of the Inset classes already to put all those overidden function in groups:

    /// \name Public functions inherited from Inset class
    //@{
    ///
    void write(std::ostream & os) const { p_.write(os); }
    ///
    void read(Lexer & lex) { p_.read(lex); }
    //@}

Doxygen even understands this, and will use the comment from Inset.h in the generated html for this class.

Vincent

Reply via email to