]> Sergey Matveev's repositories - nnn.git/commit
Decide string length at compile time (#1130)
author0xACE <0xACE@users.noreply.github.com>
Tue, 17 Aug 2021 04:51:02 +0000 (04:51 +0000)
committerArun Prakash Jana <engineerarun@gmail.com>
Tue, 17 Aug 2021 04:56:33 +0000 (10:26 +0530)
commit9d4330e382e5b3542bd5f51690c8bb0bdbff1fd8
treeffc68ded76485cc9790f9fa6b90afef3150ad49e
parent86648ab391483cb72308a5035c55d6ca55b01254
Decide string length at compile time (#1130)

I run into many premature optimizations in our codebase which are
unnecessary.

In this particular case `strlen()` is optimized at compile time even at
`-O0` with `gcc`.

I would value higher code quality than dealing with these things in our
future endeavours. If this is accepted I may supply some more
readability patches.
src/nnn.c