fix shadowed local variables
This commit is contained in:
parent
bcfc1e7a3f
commit
30df041de6
|
@ -1383,20 +1383,24 @@ void OPENGL_GAL::drawBitmapOverbar( double aLength, double aHeight )
|
||||||
Restore();
|
Restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
const bitmap_glyph* OPENGL_GAL::lookupGlyph( unsigned int codepoint ) const
|
const bitmap_glyph* OPENGL_GAL::lookupGlyph( unsigned int aCodepoint ) const
|
||||||
{
|
{
|
||||||
#ifdef BITMAP_FONT_USE_SPANS
|
#ifdef BITMAP_FONT_USE_SPANS
|
||||||
auto *end = font_codepoint_spans + sizeof( font_codepoint_spans ) / sizeof( bitmap_span );
|
auto *end = font_codepoint_spans + sizeof( font_codepoint_spans ) / sizeof( bitmap_span );
|
||||||
auto ptr = std::upper_bound( font_codepoint_spans, end, codepoint,
|
auto ptr = std::upper_bound( font_codepoint_spans, end, aCodepoint,
|
||||||
[]( unsigned int codepoint, const bitmap_span& span ) {
|
[]( unsigned int codepoint, const bitmap_span& span )
|
||||||
|
{
|
||||||
return codepoint < span.end;
|
return codepoint < span.end;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if( ptr != end && ptr->start <= codepoint ) {
|
if( ptr != end && ptr->start <= aCodepoint )
|
||||||
unsigned int index = codepoint - ptr->start + ptr->cumulative;
|
{
|
||||||
|
unsigned int index = aCodepoint - ptr->start + ptr->cumulative;
|
||||||
return &font_codepoint_infos[index];
|
return &font_codepoint_infos[index];
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -380,7 +380,7 @@ private:
|
||||||
*/
|
*/
|
||||||
std::pair<VECTOR2D, float> computeBitmapTextSize( const wxString& aText ) const;
|
std::pair<VECTOR2D, float> computeBitmapTextSize( const wxString& aText ) const;
|
||||||
|
|
||||||
const bitmap_glyph* lookupGlyph( unsigned int codepoint ) const;
|
const bitmap_glyph* lookupGlyph( unsigned int aCodepoint ) const;
|
||||||
|
|
||||||
// Event handling
|
// Event handling
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2549,7 +2549,7 @@ void SPECCTRA_DB::doCLASS( CLASS* growth ) throw( IO_ERROR, boost::bad_pointer )
|
||||||
{
|
{
|
||||||
std::string builder;
|
std::string builder;
|
||||||
int bracketNesting = 1; // we already saw the opening T_LEFT
|
int bracketNesting = 1; // we already saw the opening T_LEFT
|
||||||
T tok = T_NONE;
|
tok = T_NONE;
|
||||||
|
|
||||||
while( bracketNesting!=0 && tok!=T_EOF )
|
while( bracketNesting!=0 && tok!=T_EOF )
|
||||||
{
|
{
|
||||||
|
@ -2563,9 +2563,9 @@ void SPECCTRA_DB::doCLASS( CLASS* growth ) throw( IO_ERROR, boost::bad_pointer )
|
||||||
|
|
||||||
if( bracketNesting >= 1 )
|
if( bracketNesting >= 1 )
|
||||||
{
|
{
|
||||||
T prevTok = (T) PrevTok();
|
T previousTok = (T) PrevTok();
|
||||||
|
|
||||||
if( prevTok!=T_LEFT && prevTok!=T_circuit && tok!=T_RIGHT )
|
if( previousTok!=T_LEFT && previousTok!=T_circuit && tok!=T_RIGHT )
|
||||||
builder += ' ';
|
builder += ' ';
|
||||||
|
|
||||||
if( tok==T_STRING )
|
if( tok==T_STRING )
|
||||||
|
|
Loading…
Reference in New Issue