Inline swapping of values