Added center_rect_in_rect() utility method
Fix warnings when compiling with gcc 4.7.1