ensureSafe - multiple declarations

Function ensureSafe

Takes in an integer output from an SDL function and then throws an error if the integer isn't 0 Because SDL doesn't throw errors, but rather returns codes, 0 means a successful finish to a function Any non-zero output from a function means that SDL encountered an error, and this function will throw upon an SDL error

void ensureSafe (
  int output
);

Function ensureSafe

Takes in an object from an SDL function and then throws an error if the object is null Because SDL doesn't throw errors upon failed object creation, but constructs the object as a null, a non-null object means a successful creation Any null creation means that SDL encountered an error, and this function will throw an SDL error accordingly

T ensureSafe(T) (
  T output
);