Jump to content

Recommended Posts

Hello everyone!

I've started working on rewriting the Spline class by making it more conform to the C++ standard (usage of iterators, algorithms).

Some questions:

  • What is your opinion about const correctness?
  • Is C++11 a supported feature?
  • Are STL algorithms such as find_if, generate_n preferable to rewriting the algorithm?

Thanks for reading!

Link to post
Share on other sites

  • We don't want const everywhere, just where it makes sense. Usually in the game this means big objects that (of course) won't be modified. const-ing a float or something trivial like that is cluttering.
  • Not yet, but that shouldn't necessarily stop you. You could make 2 versions or something like that.
  • Usually we prefer STL algorithm unless there is a good reason not to use them (not the fastest in our case, redundant). I'm not familiar with those, but unless there is an equivalent, clearer way to do the same thing, use them.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...