Bug: unitialized Path::Iterator member var


#1

Path::Iterator::Iterator() leaves the member var elementType uninitialized. This causes an uninitialized var warning (or error in our case) when compiling with gcc 4.9.3 (64-bit linux, but I don’t think that should matter):

.../JUCE/modules/juce_graphics/fonts/juce_Typeface.cpp: In member function ‘void juce::Typeface::applyVerticalHintingTransform(float, juce::Path&)’:
.../JUCE/modules/juce_graphics/fonts/juce_Typeface.cpp:163:13: error: ‘i’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             switch (i.elementType)
             ^
.../JUCE/modules/juce_graphics/fonts/juce_Typeface.cpp:161:29: note: ‘i’ was declared here
         for (Path::Iterator i (path); i.next();)
                             ^

Adding an initializer for elementType in Path::Iterator::Iterator() fixes this.


#2

Thanks for the heads up. A fix for this should appear on develop soon.