Page 1 of 1

compiler Error

Posted: 06.12.2005, 11:58
by HB
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

Re: compiler Error

Posted: 06.12.2005, 16:12
by t00fri
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

Posted: 06.12.2005, 17:51
by chris
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