lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Includes ordering (was: Re: [lmi-commits] master e4f1a40: Store th


From: Vadim Zeitlin
Subject: [lmi] Includes ordering (was: Re: [lmi-commits] master e4f1a40: Store the last selected page of MvcController persistently)
Date: Wed, 25 Apr 2018 18:03:22 +0200

On Wed, 25 Apr 2018 11:38:03 -0400 (EDT) Greg Chicares <address@hidden> wrote:

GC> branch: master
GC> commit e4f1a40cf81bcb9ca65777cb193e198582229cf3
GC> Author: Vadim Zeitlin <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC> 
GC>     Store the last selected page of MvcController persistently
GC>     
GC>     Instead of just remembering the last selected page during each program
GC>     execution (and doing it manually), register the MvcController book
GC>     control with wxPersistenceManager to automatically remember and restore
GC>     the last selected page automatically even between program executions.
GC>     
GC>     [Amended by GWC to be acceptable to 'hooks/pre-commit'.]

 Sorry, I forgot to update my pre-commit hook to check concinnity. I'll do
it now...

GC> ---
GC>  mvc_controller.cpp | 21 +++++++++++----------
GC>  1 file changed, 11 insertions(+), 10 deletions(-)
GC> 
GC> diff --git a/mvc_controller.cpp b/mvc_controller.cpp
GC> index 04a7b68..6914184 100644
GC> --- a/mvc_controller.cpp
GC> +++ b/mvc_controller.cpp
GC> @@ -44,6 +44,7 @@
GC>  #include <wx/checkbox.h>
GC>  #include <wx/ctrlsub.h>
GC>  #include <wx/datectrl.h>
GC> +#include <wx/persist/bookctrl.h>
GC>  #include <wx/radiobox.h>
GC>  #include <wx/spinctrl.h>
GC>  #include <wx/textctrl.h>
GC> @@ -56,11 +57,6 @@

 I do wonder about this rule however: is it really a good idea to
alphabetically sort headers containing a different number of path
components? Perhaps it would be preferable to write the above as

        #include <wx/checkbox.h>
        #include <wx/ctrlsub.h>
        #include <wx/datectrl.h>
        #include <wx/radiobox.h>
        #include <wx/spinctrl.h>
        #include <wx/textctrl.h>

        #include <wx/persist/bookctrl.h>

instead?

 More generally, before I add this rule to vz/Style-guide.md, do I
understand correctly that the order of header groups is:

0. The PCH header in the source files or config.hpp in the headers.
1. The header corresponding to the current source file.
2. Other lmi headers.
3. 3rd party library headers (in which order if more than one used?).
4. Standard library headers.

?

 Thanks,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]