RE: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-26 Thread Vivian Meazza
Alex Romosan


 Vivian Meazza [EMAIL PROTECTED] writes:
 
  Alex Romosan asked:
 
  Vivian Meazza [EMAIL PROTECTED] writes:
 
   The function in AIFlightPlan.cxx was not defined in AIFlightPlan.hxx
 so
  far
   as the compiler was concerned.
  
   It now compiles and runs OK
 
  i don't understand. does the cvs version compile or do you still have
  to make those changes to get it to compile?
 
 
  Before I made the corrections cvs failed to compile. After I made the
  corrections (those in the diff) cvs compiled and ran.
 
 this is why i would've have liked to see the original error message.
 if the compiler didn't like those changes here it should've not liked
 them everywhere else. unfortunately i don't have cygwin installed to
 compile it myself.
 
 --alex--
 

A quick inspection of the diff should show you that the compiler didn't like
'string' in the .hxx file where 'const string' was used in the .cxx. I
changed the .hxx file. Perhaps I should have changed the .cxx, but anyway it
works. 

It is entirely possible that the fault lies in the cvs version that I have
here, but I think I have the correct HEAD version.

V. 


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-26 Thread Erik Hofman

Vivian Meazza wrote:


It is entirely possible that the fault lies in the cvs version that I have
here, but I think I have the correct HEAD version.


It looks like your src/AIModels/AIFlightPlanCreate.cxx isn't up to date.
You might want to run cvs up -PdAC AIFlightPlanCreate.cxx

Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-25 Thread Vivian Meazza
Andy Ross

 
 Vivian Meazza discovered:
  AIFlightPlan.cxx:69: error: passing `const std::string' as `this'
 argument
  of `std::basic_string_CharT, _Traits, _Alloc
 std::basic_string_CharT,
  _Traits, _Alloc::operator=(const _CharT*) [with _CharT = char, _Traits
 =
  std::char_traitschar, _Alloc = std::allocatorchar]' discards
  qualifiers
 
 Heh, don't you just *love* C++ error messages? :)
 Translated:
 
   AIFlightPlan.cxx:69: error: passing `const string' as `this' argument
   of `string::operator=()' discards qualifiers
 
 You can't assign to a const object, basically.  No idea why this compiles
 correctly on other platforms...
 

Cracked that one - I introduced it in correcting others. So all done now. 

Just preparing a diff of the changes that I had to apply to get Cygwin to
compile.

Thanks

Vivian


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re:[Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-25 Thread Vivian Meazza
Vivian Meazza wrote

 
 Andy Ross
 
 
  Vivian Meazza discovered:
   AIFlightPlan.cxx:69: error: passing `const std::string' as `this'
  argument
   of `std::basic_string_CharT, _Traits, _Alloc
  std::basic_string_CharT,
   _Traits, _Alloc::operator=(const _CharT*) [with _CharT = char,
 _Traits
  =
   std::char_traitschar, _Alloc = std::allocatorchar]' discards
   qualifiers
 
  Heh, don't you just *love* C++ error messages? :)
  Translated:
 
AIFlightPlan.cxx:69: error: passing `const string' as `this' argument
of `string::operator=()' discards qualifiers
 
  You can't assign to a const object, basically.  No idea why this
 compiles
  correctly on other platforms...
 
 
 Cracked that one - I introduced it in correcting others. So all done now.
 
 Just preparing a diff of the changes that I had to apply to get Cygwin to
 compile.
 

I attach a diff against CVS - HEAD which I applied to get CVS to compile
under Cygwin. It may not be the best or preferred way to do it, but the
patch works here, so far as I can see.

Regards,

Vivian


CVS.diff
Description: Binary data
___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

RE: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-25 Thread Vivian Meazza
Alex Romosan asked

 
 Vivian Meazza [EMAIL PROTECTED] writes:
 
  I attach a diff against CVS - HEAD which I applied to get CVS to compile
  under Cygwin. It may not be the best or preferred way to do it, but the
  patch works here, so far as I can see.
 
 
 diff -u -w -b -r1.11 AIFlightPlan.hxx
 --- AIFlightPlan.hxx25 Oct 2005 13:49:56 -  1.11
 +++ AIFlightPlan.hxx25 Oct 2005 19:17:09 -
 @@ -77,14 +77,14 @@
time_t getStartTime() { return start_time; };
 
voidcreate(FGAirport *dep, FGAirport *arr, int leg, double alt,
 double speed, double lat, double lon,
 -bool firstLeg, double radius, const string fltType,
 const string aircraftType, const string airline);
 +bool firstLeg, double radius, string fltType, string
 aircraftType, string airline);
 
void setLeg(int val) { leg = val;};
void setTime(time_t st) { start_time = st; };
int getGate() { return gateId; };
double getLeadInAngle() { return leadInAngle; };
 -  const string getRunway() { return rwy._rwy_no; };
 -  const string getRunwayId() { return rwy._id; };
 +  string getRunway() { return rwy._rwy_no; };
 +  string getRunwayId() { return rwy._id; };
void setRepeat(bool r) { repeat = r; };
bool getRepeat(void) { return repeat; };
void restart(void);
 
 why do you need to do this? 

Er ... because Cygwin wouldn't compile?

what was the error when trying to compile
 the cvs version?


The function in AIFlightPlan.cxx was not defined in AIFlightPlan.hxx so far
as the compiler was concerned.

It now compiles and runs OK

V. 
 


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS:FlightGear/src/ATCAIEntity.cxx, 1.12,

2005-10-25 Thread Vivian Meazza

Alex Romosan asked:
 
 Vivian Meazza [EMAIL PROTECTED] writes:
 
  The function in AIFlightPlan.cxx was not defined in AIFlightPlan.hxx so
 far
  as the compiler was concerned.
 
  It now compiles and runs OK
 
 i don't understand. does the cvs version compile or do you still have
 to make those changes to get it to compile?


Before I made the corrections cvs failed to compile. After I made the
corrections (those in the diff) cvs compiled and ran.

V.


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d