On Friday 11 January 2008, LeeE wrote:
> I've had a look at the relevant code but as I'm not up on c++ I'm
> not sure about what I'm looking at but at lines 798-802 there's:
>
> void FGXMLAutopilot::reinit() {
>     components.clear();
>     init();
>     build();
> }
>
> I could find init() & build() and thought that components.clear()
> must be what removes old instances and must be a more generic
> function.  However, when I grepped through the SimGear & FlightGear
> source the only occurrence I could find of this function was at
> that single point in xmlauto.cxx.  I then searched for
> components.clear() in C/C++ reference manuals on the web and didn't
> find anything there either.  Perhaps I just wasn't looking in the
> right place though.
>
> In any case, it seems strange to me that if components.clear() is a
> generic function, it's only used in this one place in the entire
> SG/FG source.

Actually it's only the clear() part that it "generic". clear() is a method of 
the vector template.

> I might be barking up the wrong tree entirely here, but I can't see
> what else might be causing the behaviour I'm seeing.

Try commenting out the call to build() from the code that you quoted above. 
build() is called inside init(), so there should be no need to call it again 
after init().


-- 
Roy Vegard Ovesen

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to