Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the codebase for this repository is still small I think its a good opportunity to do define some guidelines regarding style that could also be applied on other REST-for-Physics repositories. It may be useful to new contributors such as @AlvaroEzq or @Anakintana.
Using
const
on the return type is generally not recommened (I have done it on the past myself, before I learned this). See https://stackoverflow.com/questions/1579435/should-useless-type-qualifiers-on-return-types-be-used-for-clarity for more details, but basically it does nothing, it can be viewed as a hint to whoever reads the code but generally its not worth polluting the codebase for this (you could just add a comment if it was really important I guess).Funcion declarations (header file) do not need to have parameters marked as
const
, this is only required in the definition (source file). In general it is recommended to only mark themconst
in the definition. See https://stackoverflow.com/questions/38660537/why-is-const-unnecessary-in-function-declarations-in-header-files-for-parameters for more details.