Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Create implementation sometimes adds class to rval
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tjcbs
Tomato Guru

104 Posts

Posted - Sep 15 2016 :  06:05:43 AM  Show Profile  Reply with Quote
Sometimes, but not always, Create implementation adds the class name to the return value, like this.

mat4::mat4& mat4::setPos(const vec3& pos)
{

}


Notice the "mat4::" prepended to the return value.

I don't know why this is happening for this class, but not others. The class is below:


struct mat4
{
   mat4();
   mat4(    float cxrx, float cxry, float cxrz, float cxrw,
            float cyrx, float cyry, float cyrz, float cyrw,
            float czrx, float czry, float czrz, float czrw,
            float cwrx, float cwry, float cwrz, float cwrw); 
   
   void set(float cxrx, float cxry, float cxrz, float cxrw,
            float cyrx, float cyry, float cyrz, float cyrw,
            float czrx, float czry, float czrz, float czrw,
            float cwrx, float cwry, float cwrz, float cwrw); 

   mat4& identity();
   mat4& transform(const vec3& pos);
   mat4& setPos(const vec3& pos);
   mat4& lookAt(const vec4& eye, const vec4& target, const vec4& up);
   mat4& perspective(float fovY, float aspect, float zNear, float zFar);
   mat4& rotate(float rad, const vec3& axis);
   mat4& rotateAbout(float rad, const vec3& axis, const vec3& pos = vec3(0.f));
   mat4&  operator *=(const mat4& n);
   mat4  operator *(const mat4& n);
   vec4  operator *(const vec4& u);
   operator float*();
   operator const float*() const;


   vec4 x, y, z, w;
};


If need be I can send the referenced header files.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 15 2016 :  7:17:45 PM  Show Profile  Reply with Quote
I cannot reproduce the problem using your sample code.

Do you have a namespace named mat4?

If you open Find Symbol Dialog (alt+shift+s) and type .mat4. what results do you get? Do you only get results related to this very class? What if you untick the checkbox named "Show only symbols defined in current solution"? Does it make any different in this regard?
Go to Top of Page

tjcbs
Tomato Guru

104 Posts

Posted - Sep 16 2016 :  08:46:48 AM  Show Profile  Reply with Quote
No, it only shows symbols related to this class, even without the checkbox ticked.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 19 2016 :  7:24:29 PM  Show Profile  Reply with Quote
Did you try to reproduce this in your "real" project which you are working with?

Can you please try creating a clean new C++ console project, paste the code and try reproducing this problem there? I am wondering if your code has something that causes this OR if some setting or other environmental factor is playing a role here.

Edited by - accord on Sep 20 2016 9:35:23 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000