Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-17 15:36:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-17 15:36:28 +0400
commit3a6f573b952d9219d4836977a59451aeb3945a8a (patch)
tree3231f09726c99de2eb662dd064adad6905ba51ee
parentf5f25b81e8963aeba0a4c09f09358de070e0f927 (diff)
style cleanup: also quiet a warning.
-rw-r--r--source/blender/collada/collada.h10
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c11
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c40
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c7
-rw-r--r--source/blender/windowmanager/intern/wm_window.c18
6 files changed, 44 insertions, 44 deletions
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
index 4261e31c413..63f791ba80e 100644
--- a/source/blender/collada/collada.h
+++ b/source/blender/collada/collada.h
@@ -37,15 +37,9 @@ extern "C" {
typedef enum BC_export_mesh_type {
BC_MESH_TYPE_VIEW,
- BC_MESH_TYPE_RENDER,
+ BC_MESH_TYPE_RENDER
} BC_export_mesh_type;
-static EnumPropertyItem prop_bc_export_mesh_type[] = {
- {BC_MESH_TYPE_VIEW, "view", 0, "View", "Apply modifier's view settings"},
- {BC_MESH_TYPE_RENDER, "render", 0, "Render", "Apply modifier's render settings"},
- {0, NULL, 0, NULL, NULL}
-};
-
struct bContext;
struct Scene;
@@ -56,7 +50,7 @@ int collada_import(bContext *C, const char *filepath);
int collada_export(Scene *sce,
const char *filepath,
int apply_modifiers,
- BC_export_mesh_type export_mesh_type,
+ BC_export_mesh_type export_mesh_type,
int selected,
int include_children,
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index a8c94865aa5..ff1f47cbbaa 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -475,7 +475,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
glTexImage2D(triple->target, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glTexParameteri(triple->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(triple->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- // The current color is ignored if the GL_REPLACE texture environment is used.
+ /* The current color is ignored if the GL_REPLACE texture environment is used. */
// glTexEnvi(triple->target, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBindTexture(triple->target, 0);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index c46c382c37f..3d483c06419 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -867,7 +867,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
}
else {
/* debug, important to leave a while, should never happen */
- printf("invalid operator call '%s'\n", ot->idname);
+ printf("%s: invalid operator call '%s'\n", __func__, ot->idname);
}
/* Note, if the report is given as an argument then assume the caller will deal with displaying them
@@ -1436,8 +1436,9 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
}
}
- else
- printf("wm_handler_operator_call error\n");
+ else {
+ printf("%s: error - missing modal\n", __func__);
+ }
}
else {
wmOperatorType *ot = WM_operatortype_find(event->keymap_idname, 0);
@@ -2260,7 +2261,7 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap
wmEventHandler *handler;
if (!keymap) {
- printf("WM_event_add_keymap_handler called with NULL keymap\n");
+ printf("%s: called with NULL keymap\n", __func__);
return NULL;
}
@@ -2703,7 +2704,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
event.y = evt->y = (win->sizey - 1) - cy;
}
- // Use prevx/prevy so we can calculate the delta later
+ /* Use prevx/prevy so we can calculate the delta later */
event.prevx = event.x - pd->deltaX;
event.prevy = event.y - (-pd->deltaY);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 770d621f2b5..26e9c845302 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -157,7 +157,7 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType *))
ot->name = N_("Dummy Name");
}
- // XXX All ops should have a description but for now allow them not to.
+ /* XXX All ops should have a description but for now allow them not to. */
RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : N_("(undocumented operator)"));
RNA_def_struct_identifier(ot->srna, ot->idname);
@@ -1646,8 +1646,8 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
else
G.f &= ~G_SCRIPT_AUTOEXEC;
- // XXX wm in context is not set correctly after WM_read_file -> crash
- // do it before for now, but is this correct with multiple windows?
+ /* XXX wm in context is not set correctly after WM_read_file -> crash */
+ /* do it before for now, but is this correct with multiple windows? */
WM_event_add_notifier(C, NC_WINDOW, NULL);
WM_read_file(C, path, op->reports);
@@ -1877,8 +1877,8 @@ static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
G.fileflags |= G_FILE_RECOVER;
- // XXX wm in context is not set correctly after WM_read_file -> crash
- // do it before for now, but is this correct with multiple windows?
+ /* XXX wm in context is not set correctly after WM_read_file -> crash */
+ /* do it before for now, but is this correct with multiple windows? */
WM_event_add_notifier(C, NC_WINDOW, NULL);
/* load file */
@@ -1909,8 +1909,8 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
G.fileflags |= G_FILE_RECOVER;
- // XXX wm in context is not set correctly after WM_read_file -> crash
- // do it before for now, but is this correct with multiple windows?
+ /* XXX wm in context is not set correctly after WM_read_file -> crash */
+ /* do it before for now, but is this correct with multiple windows? */
WM_event_add_notifier(C, NC_WINDOW, NULL);
/* load file */
@@ -2218,7 +2218,7 @@ void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
{
uiLayout *box, *row, *col, *sub, *split;
- // Export Options:
+ /* Export Options: */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, 0);
uiItemL(row, IFACE_("Export Data Options:"), ICON_MESH_DATA);
@@ -2251,7 +2251,7 @@ void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
row = uiLayoutRow(box, 0);
uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE);
- // Collada options:
+ /* Collada options: */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, 0);
uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER);
@@ -2275,6 +2275,12 @@ static void wm_collada_export_draw(bContext *UNUSED(C), wmOperator *op)
static void WM_OT_collada_export(wmOperatorType *ot)
{
+ static EnumPropertyItem prop_bc_export_mesh_type[] = {
+ {BC_MESH_TYPE_VIEW, "view", 0, "View", "Apply modifier's view settings"},
+ {BC_MESH_TYPE_RENDER, "render", 0, "Render", "Apply modifier's render settings"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
ot->name = "Export COLLADA";
ot->description = "Save a Collada file";
ot->idname = "WM_OT_collada_export";
@@ -2566,7 +2572,7 @@ int WM_border_select_modal(bContext *C, wmOperator *op, wmEvent *event)
}
}
-// // Allow view navigation???
+// /* Allow view navigation??? */
// else {
// return OPERATOR_PASS_THROUGH;
// }
@@ -2585,7 +2591,7 @@ int WM_border_select_cancel(bContext *C, wmOperator *op)
/* works now only for selection or modal paint stuff, calls exec while hold mouse, exit on release */
#ifdef GESTURE_MEMORY
-int circle_select_size = 25; // XXX - need some operator memory thing\!
+int circle_select_size = 25; /* XXX - need some operator memory thing! */
#endif
int WM_gesture_circle_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -2668,7 +2674,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED; /* use finish or we don't get an undo */
}
}
-// // Allow view navigation???
+// /* Allow view navigation??? */
// else {
// return OPERATOR_PASS_THROUGH;
// }
@@ -3798,14 +3804,14 @@ static void WM_OT_dependency_relations(wmOperatorType *ot)
static int wm_ndof_sensitivity_exec(bContext *UNUSED(C), wmOperator *op)
{
- const float min = 0.25f, max = 4.f; // TODO: get these from RNA property
+ const float min = 0.25f, max = 4.0f; /* TODO: get these from RNA property */
float change;
float sensitivity = U.ndof_sensitivity;
if (RNA_boolean_get(op->ptr, "fast"))
- change = 0.5f; // 50% change
+ change = 0.5f; /* 50% change */
else
- change = 0.1f; // 10%
+ change = 0.1f; /* 10% */
if (RNA_boolean_get(op->ptr, "decrease")) {
sensitivity -= sensitivity * change;
@@ -3931,7 +3937,7 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, GESTURE_MODAL_SELECT);
-#if 0 // Durien guys like this :S
+#if 0 /* Durien guys like this :S */
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_SHIFT, 0, GESTURE_MODAL_DESELECT);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_SHIFT, 0, GESTURE_MODAL_NOP);
#else
@@ -4010,7 +4016,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, GESTURE_MODAL_SELECT);
WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_RELEASE, KM_ANY, 0, GESTURE_MODAL_SELECT);
-#if 0 // Durian guys like this
+#if 0 /* Durian guys like this */
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_SHIFT, 0, GESTURE_MODAL_BEGIN);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_SHIFT, 0, GESTURE_MODAL_DESELECT);
#else
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index cf983f7795f..d599b9504e8 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -194,9 +194,8 @@ void wm_subwindow_close(wmWindow *win, int swinid)
MEM_freeN(swin);
}
else {
- printf("wm_subwindow_close: Internal error, bad winid: %d\n", swinid);
+ printf("%s: Internal error, bad winid: %d\n", __func__, swinid);
}
-
}
/* pixels go from 0-99 for a 100 pixel window */
@@ -233,7 +232,7 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct)
wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f);
}
else {
- printf("wm_subwindow_position: Internal error, bad winid: %d\n", swinid);
+ printf("%s: Internal error, bad winid: %d\n", __func__, swinid);
}
}
@@ -250,7 +249,7 @@ void wmSubWindowScissorSet(wmWindow *win, int swinid, rcti *srct)
_curswin = swin_from_swinid(win, swinid);
if (_curswin == NULL) {
- printf("wmSubWindowSet %d: doesn't exist\n", swinid);
+ printf("%s %d: doesn't exist\n", __func__, swinid);
return;
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 6b3735020b4..dd501e6d880 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -402,7 +402,7 @@ void wm_window_add_ghostwindows(wmWindowManager *wm)
wm_get_screensize(&wm_init_state.size_x, &wm_init_state.size_y);
#if defined(__APPLE__) && !defined(GHOST_COCOA)
-//Cocoa provides functions to get correct max window size
+ /* Cocoa provides functions to get correct max window size */
{
extern void wm_set_apple_prefsize(int, int); /* wm_apple.c */
@@ -632,9 +632,9 @@ void wm_window_make_drawable(bContext *C, wmWindow *win)
}
/* called by ghost, here we handle events for windows themselves or send to event system */
-static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
+static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr)
{
- bContext *C = private;
+ bContext *C = C_void_ptr;
wmWindowManager *wm = CTX_wm_manager(C);
GHOST_TEventType type = GHOST_GetEventType(evt);
int time = GHOST_GetEventTime(evt);
@@ -648,14 +648,14 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
wmWindow *win;
if (!ghostwin) {
- // XXX - should be checked, why are we getting an event here, and
- // what is it?
+ /* XXX - should be checked, why are we getting an event here, and */
+ /* what is it? */
puts("<!> event has no window");
return 1;
}
else if (!GHOST_ValidWindow(g_system, ghostwin)) {
- // XXX - should be checked, why are we getting an event here, and
- // what is it?
+ /* XXX - should be checked, why are we getting an event here, and */
+ /* what is it? */
puts("<!> event has invalid window");
return 1;
}
@@ -859,7 +859,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
event = *(win->eventstate); /* copy last state, like mouse coords */
- // activate region
+ /* activate region */
event.type = MOUSEMOVE;
event.prevx = event.x;
event.prevy = event.y;
@@ -894,7 +894,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
WM_event_start_drag(C, icon, WM_DRAG_PATH, stra->strings[a], 0.0);
/* void poin should point to string, it makes a copy */
- break; // only one drop element supported now
+ break; /* only one drop element supported now */
}
}