Only the getter should take a const parameter and thus need the const cast
to work around this brokenness in the api.

--
Ryan Pavlik
HCI and Computer Science Graduate Student
Iowa State University

Sent from my Android tablet
On Oct 1, 2013 5:14 PM, "Leif Berg" <notifications@github.com> wrote:

> In vrjugglua/binding_detail/BindSonixToLua.inl:
>
> > @@ -32,6 +32,22 @@
> >  #include <iostream>
> >  #endif
> >
> > +namespace{
> > +	 osg::Vec3f scalingGetPosition(snx::SoundHandle &h){
> > +		const double feetToMeters = 0.3048;
> > +		float x, y, z;
> > +		snx::SoundHandle &hbetter = const_cast<snx::SoundHandle&>(h);
> > +		hbetter.getPosition(x,y,z);
> > +		return  osg::Vec3f(x,y,z)*feetToMeters;
> > +	}
> > +	void scalingSetPosition(snx::SoundHandle &h, osg::Vec3 &vec){
> > +		const double metersToFeet = 3.28084;
> > +		osg::Vec3f scaledVec = vec*metersToFeet;
> > +		snx::SoundHandle &hbetter = const_cast<snx::SoundHandle&>(h);
>
> I can remove them, but then the args on lines 36 and 43 can't be const
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/vancegroup/vr-jugglua/pull/111/files#r6701549>
> .
>