| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| mData.clear(); | ||
| } | ||
|
|
||
| bool getFileId(const std::string &path, FileID &id) |
There was a problem hiding this comment.
should it be static also? the declaration is static as far as I can tell.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes. That should have been caught by the compiler or clang-tidy though.
Sorry, something went wrong.
There was a problem hiding this comment.
I am confused by your comments.. do you plan to add the static keyword or is there some reason to not add it?
Sorry, something went wrong.
There was a problem hiding this comment.
It is already static in the forward declaration - see the other comment thread.
Sorry, something went wrong.
There was a problem hiding this comment.
so the reason you don't write static here is because that would be redundant?
To me it would feel preferable to match the prototype and write the static keyword even if it's technically redundant.
Sorry, something went wrong.
There was a problem hiding this comment.
Now I am finally getting what your are aiming for. I have never seen code written like that. Usually static (like extern) is only applied to the declaration. It is valid code though and does not even trigger a warning (which is surprising to me).
Sorry, something went wrong.
There was a problem hiding this comment.
I think the reason the extern is usually not written is that it's totally redundant. the function is extern with or without the keyword..
I want that we have matching declaration and definition. I don't want that any static or typename or variablename differ or anything even if it does not technically matter.
Sorry, something went wrong.
There was a problem hiding this comment.
| bool getFileId(const std::string &path, FileID &id) | |
| static bool getFileId(const std::string &path, FileID &id) |
for methods the static must be left out for the out of line definition. but that doesn't mean it should be left out here.
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
| static bool getFileId(const std::string &path, FileID &id); | ||
|
|
There was a problem hiding this comment.
Ah - I forward declared it so the code doesn't need to be moved.
Sorry, something went wrong.
|
Would have been great to have this land before the release. |
Sorry, something went wrong.
I thought of this as a refactoring that is not a hurry.. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.