tronkko / dirent

C/C++ library for retrieving information on files and directories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce scope for a few local variables?

elfring opened this issue · comments

A few local variables are declared at the beginning of functions despite of the detail that they are used only a bit later in these implementations.
Will it help to reduce the scope for such variables?

You are right, as always :) Reduction of the scope would improve readability. However, I like to keep the code compatible with older versions of Visual Studio which did require variables to be declared at the beginning of the block.

How would you interpret the beginning of the block for a possible adjustment?

Older compilers just needed an extra block like in commit b33e10c