Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCornstalks

Posted 31 January 2013 - 07:45 AM

Sorry, I'm not sure what you're asking. Personally, I only use auto for unweildly/very long typenames, like std::map<std::string, MyClass>::const_iterator, for example.

 

What's difficult about your code is that it's not clear what Get() returns (from just reading the function F()). If it were perhaps more appropriately named, it would help improve the clarity of your code.

 

Completely ignore this post! I didn't realize this was the AngleCode forum... sorry for being so blind! I thought FDsagizi might be asking what people thought of auto and if it was good to use it in the following code. I realize now that I wasn't even remotely close (and where's GameDev's embarrassed smiley!?).


#2Cornstalks

Posted 31 January 2013 - 07:43 AM

Sorry, I'm not sure what you're asking. Personally, I only use auto for unweildly/very long typenames, like std::map<std::string, MyClass>::const_iterator, for example.

 

What's difficult about your code is that it's not clear what Get() returns (from just reading the function F()). If it were perhaps more appropriately named, it would help improve the clarity of your code.

 

Completely ignore this post! I didn't realize this was the AngleCode forum... sorry for being so blind!


#1Cornstalks

Posted 31 January 2013 - 02:33 AM

Sorry, I'm not sure what you're asking. Personally, I only use auto for unweildly/very long typenames, like std::map<std::string, MyClass>::const_iterator, for example.

 

What's difficult about your code is that it's not clear what Get() returns (from just reading the function F()). If it were perhaps more appropriately named, it would help improve the clarity of your code.


PARTNERS