Replace the hud rendering for loop (which linearly searches the the hud
list to find the entry with the proper position) with a simple linear traversal using an "iterator."
This commit is contained in:
parent
5ed5107fc1
commit
d8039a551e
1 changed files with 19 additions and 5 deletions
|
@ -621,9 +621,18 @@ void fgUpdateHUD( void ) {
|
||||||
|
|
||||||
glLineWidth(1);
|
glLineWidth(1);
|
||||||
|
|
||||||
for( i = hud_displays; i; --i) { // Draw everything
|
deque < instr_item * > :: iterator current;
|
||||||
// if( HUD_deque.at(i)->enabled()) {
|
deque < instr_item * > :: iterator last;
|
||||||
pHUDInstr = HUD_deque[i - 1];
|
|
||||||
|
current = HUD_deque.begin();
|
||||||
|
last = HUD_deque.end();
|
||||||
|
while ( current != last ) {
|
||||||
|
pHUDInstr = *current;
|
||||||
|
current++;
|
||||||
|
|
||||||
|
// for( i = hud_displays; i; --i) { // Draw everything
|
||||||
|
// if( HUD_deque.at(i)->enabled()) {
|
||||||
|
// pHUDInstr = HUD_deque[i - 1];
|
||||||
if( pHUDInstr->enabled()) {
|
if( pHUDInstr->enabled()) {
|
||||||
// We should to respond to a dial instead
|
// We should to respond to a dial instead
|
||||||
// or as well to the of time of day. Of
|
// or as well to the of time of day. Of
|
||||||
|
@ -686,9 +695,14 @@ void fgUpdateHUD( void ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.17 1998/07/13 21:28:02 curt
|
/* Revision 1.18 1998/07/20 12:47:55 curt
|
||||||
/* Converted the aoa scale to a radio altimeter.
|
/* Replace the hud rendering for loop (which linearly searches the the hud
|
||||||
|
/* list to find the entry with the proper position) with a simple linear
|
||||||
|
/* traversal using an "iterator."
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.17 1998/07/13 21:28:02 curt
|
||||||
|
* Converted the aoa scale to a radio altimeter.
|
||||||
|
*
|
||||||
* Revision 1.16 1998/07/13 21:00:47 curt
|
* Revision 1.16 1998/07/13 21:00:47 curt
|
||||||
* Integrated Charlies latest HUD updates.
|
* Integrated Charlies latest HUD updates.
|
||||||
* Wrote access functions for current fgOPTIONS.
|
* Wrote access functions for current fgOPTIONS.
|
||||||
|
|
Loading…
Add table
Reference in a new issue