Navigation Menu

Skip to content

Commit

Permalink
Extract assignment expression from if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 4, 2014
1 parent fbfd93c commit 512e73e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -1183,7 +1183,8 @@ static int mrn_set_geometry(grn_ctx *ctx, grn_obj *buf,
Geometry_buffer buffer;
Geometry *geometry;

if (!(geometry = Geometry::construct(&buffer, wkb, wkb_size))) {
geometry = Geometry::construct(&buffer, wkb, wkb_size);
if (!geometry) {
return -1;
}
switch (geometry->get_class_info()->m_type_id) {
Expand Down

0 comments on commit 512e73e

Please sign in to comment.