Merge pull request #2088 from 9rnsr/refactor_code

[Refactoring] code
fix Issue 10094 - NRVO with static array return should work