Result(Result &&r): result(r.result), function(r.function) { r.result = VK_SUCCESS; }
~Result() noexcept(false) { if(!checked) check(); }
- bool operator==(VkResult r) { checked = true; return result==r; }
+ bool operator==(VkResult r) { bool m = (result==r); checked |= m; return m; }
void check() { if(result!=VK_SUCCESS) throw Graphics::vulkan_error(result, function); }
};