Wrong order of member initializers

Bug #1538247 reported by Jan Dubiec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

While compiling with "g++ -Wall" a lot of warnings of this type are reported:

In file included from d:/Works/Hugin/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp:57:0:
d:/Works/Hugin/src/hugin1/base_wx/MyExternalCmdExecDialog.h: In constructor 'MyExecPanel::MyExecPanel(wxWindow*)':
d:/Works/Hugin/src/hugin1/base_wx/MyExternalCmdExecDialog.h:110:10: warning: 'MyExecPanel::m_checkReturnCode' will be initialized after [-Wreorder]
     bool m_checkReturnCode;
          ^
d:/Works/Hugin/src/hugin1/base_wx/MyExternalCmdExecDialog.h:108:12: warning: 'size_t MyExecPanel::m_queueLength' [-Wreorder]
     size_t m_queueLength;
            ^
d:/Works/Hugin/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp:77:1: warning: when initialized here [-Wreorder]
 MyExecPanel::MyExecPanel(wxWindow * parent)
 ^

More info is here: http://stackoverflow.com/questions/1828037/whats-the-point-of-g-wreorder

The patch is attached.

Regards,
/J.D.

Revision history for this message
Jan Dubiec (jdx) wrote :
Revision history for this message
tmodes (tmodes) wrote :

Please provide one single diff file per issue and not per file. The splitting above several single files make is more complicated to read, understand and to apply.
The issues mentioned in the link does not apply here. Only fixed value are used in the member initializer list. So the patch is purely cosmetic.

Changed in hugin:
status: New → Fix Committed
Revision history for this message
Jan Dubiec (jdx) wrote :

Yes, I know that in "our" case the patch is purely cosmetic but IMO it is good practice to write code which conforms to standard(s). Especially when it doesn't cost much. Consolidated patch is attached.

Regards,
/J.D.

Revision history for this message
Jan Dubiec (jdx) wrote :
Download full text (4.8 KiB)

Ooops, I've just noticed that you have already applied the patches.

Next patches will be in the form of a single file. They will be rather cosmetic because I try to fix warnings reported by -Wall option. Some of them are annoying, eg. like warning about signed/unsigned comparison in templates:

In file included from D:/Works/Hugin/src/hugin_base/nona/RemappedPanoImage.h:190:0,
                 from D:/Works/Hugin/src/hugin_base/nona/ImageRemapper.h:32,
                 from d:/Works/Hugin/src/hugin_base/huginapp/CachedImageRemapper.h:28,
                 from d:/Works/Hugin/src/hugin_base/huginapp/CachedImageRemapper.cpp:27:
D:/Works/Hugin/src/hugin_base/photometric/ResponseTransform.h: In instantiation of 'void HuginBase::Photometric::InvResponseTransform<VTIn, VTOut>::emitGLSL(std::ostringstream&, std::vector<double>&, std::vector<double>&) const [with VTIn = float; VTOut = double; std::ostringstream = std::__cxx11::basic_ostringstream<char>]':
D:/Works/Hugin/src/hugin_base/vigra_ext/ImageTransformsGPU.h:295:5: required from 'void vigra_ext::transformImageAlphaGPUIntern(vigra::triple<Iterator, Iterator, Accessor>, std::pair<MaskIterator, MaskAccessor>, vigra::triple<DestImageIterator, DestImageIterator, DestAccessor>, std::pair<AlphaImageIterator, AlphaAccessor>, TRANSFORM&, PixelTransform&, vigra::Diff2D, Interpolator, bool, AppBase::ProgressDisplay*) [with SrcImageIterator = vigra::ConstBasicImageIterator<vigra::RGBValue<float>, vigra::RGBValue<float>**>; SrcAccessor = vigra::RGBAccessor<vigra::RGBValue<float> >; SrcAlphaIterator = vigra::ConstBasicImageIterator<unsigned char, unsigned char**>; SrcAlphaAccessor = vigra::StandardConstValueAccessor<unsigned char>; DestImageIterator = vigra::BasicImageIterator<vigra::RGBValue<float>, vigra::RGBValue<float>**>; DestAccessor = vigra::RGBAccessor<vigra::RGBValue<float> >; TRANSFORM = HuginBase::PTools::Transform; PixelTransform = HuginBase::Photometric::InvResponseTransform<float, double>; AlphaImageIterator = vigra::BasicImageIterator<unsigned char, unsigned char**>; AlphaAccessor = vigra::StandardValueAccessor<unsigned char>; Interpolator = vigra_ext::interp_cubic]'
D:/Works/Hugin/src/hugin_base/vigra_ext/ImageTransformsGPU.h:550:30: required from 'void vigra_ext::transformImageAlphaGPU(vigra::triple<Iterator, Iterator, Accessor>, std::pair<MaskIterator, MaskAccessor>, vigra::triple<DestImageIterator, DestImageIterator, DestAccessor>, std::pair<AlphaImageIterator, AlphaAccessor>, vigra::Diff2D, TRANSFORM&, PixelTransform&, bool, vigra_ext::Interpolator, AppBase::ProgressDisplay*) [with SrcImageIterator = vigra::ConstBasicImageIterator<vigra::RGBValue<float>, vigra::RGBValue<float>**>; SrcAccessor = vigra::RGBAccessor<vigra::RGBValue<float> >; SrcAlphaIterator = vigra::ConstBasicImageIterator<unsigned char, unsigned char**>; SrcAlphaAccessor = vigra::StandardConstValueAccessor<unsigned char>; DestImageIterator = vigra::BasicImageIterator<vigra::RGBValue<float>, vigra::RGBValue<float>**>; DestAccessor = vigra::RGBAccessor<vigra::RGBValue<float> >; AlphaImageIterator = vigra::BasicImageIterator<unsigned char, unsigned char**>; AlphaAccessor = vigra::StandardValueAccessor<unsigned char>; TRA...

Read more...

tmodes (tmodes)
Changed in hugin:
milestone: none → 2016.2beta1
tmodes (tmodes)
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.