compiler Error

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
HB M
Posts: 132
Joined: 26.11.2002
With us: 22 years
Location: Eindhoven, The Netherlands

compiler Error

Post #1by HB » 06.12.2005, 11:58

With celx.cpp v1.79 the compiler gives a conversion error on the following code:

if (star->getOrbitBarycenter() != NULL)
{
Selection parent(star->getOrbitBarycenter());
lua_pushstring(l, "parent");
object_new(l, parent);
lua_settable(l, -3);
}

The compiler can't convert "star" to "star* "
I use vc++ 2003 on winxp
HB

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: compiler Error

Post #2by t00fri » 06.12.2005, 16:12

HB wrote:With celx.cpp v1.79 the compiler gives a conversion error on the following code:

if (star->getOrbitBarycenter() != NULL)
{
Selection parent(star->getOrbitBarycenter());
lua_pushstring(l, "parent");
object_new(l, parent);
lua_settable(l, -3);
}

The compiler can't convert "star" to "star* "
I use vc++ 2003 on winxp


Yes, I also had this error after Chris' recent commit. I fixed it within my new patch with other stuff for the forthcoming Celestia-1.4.0pre8. The code is still being tested before I commit it to CVS.

Shouldn't be long.

Bye Fridger

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Post #3by chris » 06.12.2005, 17:51

I forgot to check in a change to star.h. I changed Star::getOrbitBarycenter to return a Star* instead of a const Star*. There's no reason for this method to return a const value.

--Chris


Return to “Bugs”