code cleanup: replace cos(M_PI / 4) and sin(M_PI / 4) with M_SQRT1_2 define

also some minor style cleanup.
This commit is contained in:
2012-07-22 18:40:50 +00:00
parent ea229638a0
commit 76bea854b6
5 changed files with 12 additions and 11 deletions

View File

@@ -157,7 +157,8 @@ PyObject *bpy_text_import_name(const char *name, int *found)
}
/* we know this cant be importable, the name is too long for blender! */
if (namelen >= (MAX_ID_NAME - 2) - 3) return NULL;
if (namelen >= (MAX_ID_NAME - 2) - 3)
return NULL;
memcpy(txtname, name, namelen);
memcpy(&txtname[namelen], ".py", 4);