Fix variable shadowing warning

MSVC 14 gives the following warning:
"warning C4456: declaration of 'result' hides previous local declaration".
Merge pull request #2 from MarcelRaad/patch-1

Fix variable shadowing warning