[Github-comments] [geany/geany] Avoid re-scanning the string (PR #2962)

xiota notifications at xxxxx
Thu Nov 25 06:41:41 UTC 2021


> I thought it could document the code well instead of using hard-coded number. But maybe I should add a comment instead and use the hard-coded number?

According to internet, clang and gcc can optimize `strlen` to a constant.  So I guess it would okay.  I'd recommend leaving the space and quote out, since it's possible different implementations of make might use different quotes, especially on different operating systems.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2962#issuecomment-978882513
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211124/9d6cd1c8/attachment.htm>


More information about the Github-comments mailing list