Commit a33d34b8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Avoid needless gotos.

parent 4060716d
...@@ -151,15 +151,15 @@ static inline GpStatus clone_element(const region_element* element, ...@@ -151,15 +151,15 @@ static inline GpStatus clone_element(const region_element* element,
{ {
case RegionDataRect: case RegionDataRect:
(*element2)->elementdata.rect = element->elementdata.rect; (*element2)->elementdata.rect = element->elementdata.rect;
break; return Ok;
case RegionDataEmptyRect: case RegionDataEmptyRect:
case RegionDataInfiniteRect: case RegionDataInfiniteRect:
break; return Ok;
case RegionDataPath: case RegionDataPath:
(*element2)->elementdata.pathdata.pathheader = element->elementdata.pathdata.pathheader; (*element2)->elementdata.pathdata.pathheader = element->elementdata.pathdata.pathheader;
stat = GdipClonePath(element->elementdata.pathdata.path, stat = GdipClonePath(element->elementdata.pathdata.path,
&(*element2)->elementdata.pathdata.path); &(*element2)->elementdata.pathdata.path);
if (stat != Ok) goto clone_out; if (stat == Ok) return Ok;
break; break;
default: default:
(*element2)->elementdata.combine.left = NULL; (*element2)->elementdata.combine.left = NULL;
...@@ -167,16 +167,15 @@ static inline GpStatus clone_element(const region_element* element, ...@@ -167,16 +167,15 @@ static inline GpStatus clone_element(const region_element* element,
stat = clone_element(element->elementdata.combine.left, stat = clone_element(element->elementdata.combine.left,
&(*element2)->elementdata.combine.left); &(*element2)->elementdata.combine.left);
if (stat != Ok) goto clone_out; if (stat == Ok)
stat = clone_element(element->elementdata.combine.right, {
&(*element2)->elementdata.combine.right); stat = clone_element(element->elementdata.combine.right,
if (stat != Ok) goto clone_out; &(*element2)->elementdata.combine.right);
if (stat == Ok) return Ok;
}
break; break;
} }
return Ok;
clone_out:
delete_element(*element2); delete_element(*element2);
*element2 = NULL; *element2 = NULL;
return stat; return stat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment