move variable for assert to avoid warning in release mode