style cleanup: also some typos

This commit is contained in:
Campbell Barton 2013-02-11 00:49:00 +00:00
parent 22dbb675c1
commit 2005f7c6c0
23 changed files with 56 additions and 53 deletions

@ -88,16 +88,16 @@ CSG_PerformBooleanOperation(
BoolOpType boolType;
switch( op_type ) {
case e_csg_union:
boolType = BOP_UNION;
break;
case e_csg_difference:
boolType = BOP_DIFFERENCE;
break;
default:
boolType = BOP_INTERSECTION;
break;
switch (op_type) {
case e_csg_union:
boolType = BOP_UNION;
break;
case e_csg_difference:
boolType = BOP_DIFFERENCE;
break;
default:
boolType = BOP_INTERSECTION;
break;
}
BoolOpState boolOpResult;

@ -1028,8 +1028,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
if (!validWindow(window)) {
return GHOST_kFailure;
}
switch(eventType)
{
switch (eventType) {
case GHOST_kEventWindowClose:
pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
break;
@ -1086,8 +1085,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
if (!validWindow(window)) {
return GHOST_kFailure;
}
switch(eventType)
{
switch (eventType) {
case GHOST_kEventDraggingEntered:
case GHOST_kEventDraggingUpdated:
case GHOST_kEventDraggingExited:

@ -111,7 +111,7 @@ int BLI_file_gzip(const char *from, const char *to)
return rval;
}
/* gzip the file in from_file and write it to memery to_mem, at most size bytes.
/* gzip the file in from_file and write it to memory to_mem, at most size bytes.
* return the unziped size
*/
char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
@ -283,7 +283,7 @@ int BLI_move(const char *file, const char *to)
{
int err;
/* windows doesn't support moveing to a directory
/* windows doesn't support moving to a directory
* it has to be 'mv filename filename' and not
* 'mv filename destdir' */

@ -1662,7 +1662,7 @@ void quat_apply_track(float quat[4], short axis, short upflag)
axis = axis - 3;
/* there are 2 possible up-axis for each axis used, the 'quat_track' applies so the first
* up axis is used X->Y, Y->X, Z->X, if this first up axis isn used then rotate 90d
* up axis is used X->Y, Y->X, Z->X, if this first up axis isn't used then rotate 90d
* the strange bit shift below just find the low axis {X:Y, Y:X, Z:X} */
if (upflag != (2 - axis) >> 1) {
float q[4] = {M_SQRT1_2, 0.0, 0.0, 0.0}; /* assign 90d rotation axis */

@ -663,7 +663,7 @@ MINLINE float normalize_v3_v3(float r[3], const float a[3])
float d = dot_v3v3(a, a);
/* a larger value causes normalize errors in a
* scaled down models with camera xtreme close */
* scaled down models with camera extreme close */
if (d > 1.0e-35f) {
d = sqrtf(d);
mul_v3_v3fl(r, a, 1.0f / d);
@ -681,7 +681,7 @@ MINLINE double normalize_v3_d(double n[3])
double d = n[0] * n[0] + n[1] * n[1] + n[2] * n[2];
/* a larger value causes normalize errors in a
* scaled down models with camera xtreme close */
* scaled down models with camera extreme close */
if (d > 1.0e-35) {
double mul;

@ -45,7 +45,7 @@ struct Object;
* pointers. this is a requirement of mempool's method of
* iteration.
*
* hrm. it doesn't but stull works ok, remove the comment above? - campbell.
* hrm. it doesn't but still works ok, remove the comment above? - campbell.
*/
// #pragma GCC diagnostic error "-Wpadded"

@ -2103,7 +2103,7 @@ bool bmesh_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep)
}
/**
* \brief Unglue Region Make Vert (URMV)
* \brief Un-glue Region Make Vert (URMV)
*
* Disconnects a face from its vertex fan at loop \a sl
*

@ -35,7 +35,7 @@
/**
* \brief Iterator Step
*
* Calls an iterators step fucntion to return the next element.
* Calls an iterators step function to return the next element.
*/
BLI_INLINE void *BM_iter_step(BMIter *iter)
{

@ -472,7 +472,7 @@ BMLoop *BM_vert_step_fan_loop(BMLoop *l, BMEdge **e_step)
* The function takes a vertex at the center of a fan and returns the opposite edge in the fan.
* All edges in the fan must be manifold, otherwise return NULL.
*
* \note This could (probably) be done more effieiently.
* \note This could (probably) be done more efficiently.
*/
BMEdge *BM_vert_other_disk_edge(BMVert *v, BMEdge *e_first)
{

@ -165,7 +165,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar
}
/* apply the new difference to the rest of the shape keys,
* note that this dosn't take rotations into account, we _could_ support
* note that this doesn't take rotations into account, we _could_ support
* this by getting the normals and coords for each shape key and
* re-calculate the smooth value for each but this is quite involved.
* for now its ok to simply apply the difference IMHO - campbell */

@ -189,7 +189,7 @@ void BM_mesh_decimate_unsubdivide_ex(BMesh *bm, const int iterations, const bool
int iter_step;
/* if tag_only is set, we assyme the caller knows what verts to tag
/* if tag_only is set, we assume the caller knows what verts to tag
* needed for the operator */
if (tag_only == false) {
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {

@ -329,15 +329,18 @@ void bc_match_scale(std::vector<Object *> *objects_done,
float bl_scale;
switch(type) {
case USER_UNIT_NONE : bl_scale = 1.0; // map 1 Blender unit to 1 Meter
break;
case USER_UNIT_METRIC : bl_scale = RNA_property_float_get(&unit_settings, scale_ptr);
break;
default : bl_scale = RNA_property_float_get(&unit_settings, scale_ptr);
// it looks like the conversion to Imperial is done implicitly.
// So nothing to do here.
break;
switch (type) {
case USER_UNIT_NONE:
bl_scale = 1.0; // map 1 Blender unit to 1 Meter
break;
case USER_UNIT_METRIC:
bl_scale = RNA_property_float_get(&unit_settings, scale_ptr);
break;
default:
bl_scale = RNA_property_float_get(&unit_settings, scale_ptr);
// it looks like the conversion to Imperial is done implicitly.
// So nothing to do here.
break;
}
float size_mat3[3][3];

@ -367,8 +367,9 @@ void WM_OT_collada_import(wmOperatorType *ot)
WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
RNA_def_boolean(ot->srna,
"import_units", 0, "Import Units",
"If disabled match import to Blender's current Unit settings. Otherwise use the settings from the Imported scene.");
"import_units", 0, "Import Units",
"If disabled match import to Blender's current Unit settings. "
"Otherwise use the settings from the Imported scene");
}
#endif

@ -291,7 +291,8 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) {
bScreen *sc = win->screen;
if ((sc->temp && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) ||
(win == winshow && winshow != wincur)) {
(win == winshow && winshow != wincur))
{
wm_window_raise(win);
return OPERATOR_FINISHED;
}

@ -3597,7 +3597,7 @@ static void SCENE_OT_delete(wmOperatorType *ot)
/* ***************** region alpha blending ***************** */
/* implementation note: a disapplearing region needs at least 1 last draw with 100% backbuffer
/* implementation note: a disappearing region needs at least 1 last draw with 100% backbuffer
* texture over it- then triple buffer will clear it entirely.
* This because flag RGN_HIDDEN is set in end - region doesnt draw at all then */

@ -904,7 +904,7 @@ static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace
/* Check if a screenspace location is occluded by any other faces
* check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison
* and dosn't need to be correct in relation to X and Y coords (this is the case in perspective view) */
* and doesn't need to be correct in relation to X and Y coords (this is the case in perspective view) */
static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *bucketFace, const int orig_face, float pixelScreenCo[4])
{
MFace *mf;

@ -97,7 +97,7 @@ static void do_buttons_buttons(bContext *C, void *UNUSED(arg), int event)
sbuts->mainbuser = sbuts->mainb;
}
#define BUT_UNIT_X (UI_UNIT_X + 2*U.pixelsize)
#define BUT_UNIT_X (UI_UNIT_X + 2 * U.pixelsize)
void buttons_header_buttons(const bContext *C, ARegion *ar)
{
@ -105,7 +105,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiBlock *block;
uiBut *but;
int headery = ED_area_headersize();
int xco, yco = 0.5f*(headery - UI_UNIT_Y);
int xco, yco = 0.5f * (headery - UI_UNIT_Y);
buttons_context_compute(C, sbuts);

@ -938,17 +938,18 @@ static void build_permutation_table(unsigned short permutation[], unsigned short
permutation[i] = temp_permutation[entry];
/* delete entry */
for(k = entry; k < nr_entries_left - 1; k++)
for (k = entry; k < nr_entries_left - 1; k++) {
temp_permutation[k] = temp_permutation[k + 1];
}
}
/* verify permutation table
* every entry must appear exactly once
*/
#if 0
for(i = 0; i < number_of_rays; i++) temp_permutation[i] = 0;
for(i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]];
for(i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1);
for (i = 0; i < number_of_rays; i++) temp_permutation[i] = 0;
for (i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]];
for (i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1);
#endif
}

@ -800,7 +800,7 @@ void wm_draw_update(bContext *C)
if (state == GHOST_kWindowStateMinimized) {
/* do not update minimized windows, it gives issues on intel drivers (see [#33223])
* anyway, it seems logical to skip update for invisile windows
* anyway, it seems logical to skip update for invisible windows
*/
continue;
}

@ -3042,7 +3042,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
event.keymodifier = 0;
/* this case happened with an external numpad, it's not really clear
* why, but it's also impossible to map a key modifier to an unknwon
* why, but it's also impossible to map a key modifier to an unknown
* key, so it shouldn't harm */
if (event.keymodifier == UNKNOWNKEY)
event.keymodifier = 0;

@ -1341,7 +1341,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
uiBlockClearFlag(block, UI_BLOCK_LOOP);
/* intentionally don't use 'UI_BLOCK_MOVEMOUSE_QUIT', some dialogs have many items
/* intentionally don't use 'UI_BLOCK_MOVEMOUSE_QUIT', some dialogues have many items
* where quitting by accident is very annoying */
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
@ -1998,7 +1998,7 @@ static int wm_link_append_poll(bContext *C)
if (WM_operator_winactive(C)) {
/* linking changes active object which is pretty useful in general,
* but which totally confuses edit mode (i.e. it becoming not so obvious
* to leave from edit mode and inwalid tools in toolbar might be displayed)
* to leave from edit mode and invalid tools in toolbar might be displayed)
* so disable link/append when in edit mode (sergey) */
if (CTX_data_edit_object(C))
return 0;

@ -499,8 +499,7 @@ static void blender_crash_handler_backtrace(FILE *fp)
symbolinfo->MaxNameLen = MAXSYMBOL - 1;
symbolinfo->SizeOfStruct = sizeof(SYMBOL_INFO);
for( i = 0; i < nframes; i++ )
{
for (i = 0; i < nframes; i++) {
SymFromAddr(process, ( DWORD64 )( stack[ i ] ), 0, symbolinfo);
fprintf(fp, "%u: %s - 0x%0X\n", nframes - i - 1, symbolinfo->Name, symbolinfo->Address);

@ -74,7 +74,7 @@ void RAS_StorageIM::TexCoord(const RAS_TexVert &tv)
if (GLEW_ARB_multitexture) {
for (unit = 0; unit < *m_texco_num; unit++) {
switch(m_texco[unit]) {
switch (m_texco[unit]) {
case RAS_IRasterizer::RAS_TEXCO_ORCO:
case RAS_IRasterizer::RAS_TEXCO_GLOB:
glMultiTexCoord3fvARB(GL_TEXTURE0_ARB + unit, tv.getXYZ());
@ -97,7 +97,7 @@ void RAS_StorageIM::TexCoord(const RAS_TexVert &tv)
if (GLEW_ARB_vertex_program) {
int uv = 0;
for (unit = 0; unit < *m_attrib_num; unit++) {
switch(m_attrib[unit]) {
switch (m_attrib[unit]) {
case RAS_IRasterizer::RAS_TEXCO_ORCO:
case RAS_IRasterizer::RAS_TEXCO_GLOB:
glVertexAttrib3fvARB(unit, tv.getXYZ());