We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3035a86 + ac24ca9 commit ea37b3cCopy full SHA for ea37b3c
fred2/orienteditor.cpp
@@ -210,7 +210,7 @@ void orient_editor::update_object(object *ptr)
210
vec3d v, loc;
211
matrix m;
212
213
- memset(&v, 0, sizeof(vec3d));
+ vm_vec_zero(&v);
214
loc.xyz.x = convert(m_location_x);
215
loc.xyz.y = convert(m_location_y);
216
loc.xyz.z = convert(m_location_z);
@@ -223,10 +223,11 @@ void orient_editor::update_object(object *ptr)
223
vm_vec_sub(&v, &loc, &ptr->pos);
224
225
} else {
226
- Assert(0); // neither radio button is checked.
+ Assertion(0, "neither radio button is checked!");
227
+ return;
228
}
229
- if (!v.xyz.x && !v.xyz.y && !v.xyz.z){
230
+ if (IS_VEC_NULL(&v)) {
231
return; // can't point to itself.
232
233
0 commit comments