get rid of some warnings,

removed NG_LoopBackNetworkDeviceInterface::GetNetworkVersion(), wasnt used anywhere.
This commit is contained in:
Campbell Barton 2010-06-05 15:31:55 +00:00
parent 2403214cb4
commit 556b57febf
19 changed files with 52 additions and 84 deletions

View File

@ -362,7 +362,7 @@ static AVFrame* generate_video_frame(uint8_t* pixels, ReportList *reports)
}
if (c->pix_fmt != PIX_FMT_BGR32) {
sws_scale(img_convert_ctx, (const uint8_t * const*) rgb_frame->data,
sws_scale(img_convert_ctx, (uint8_t **) rgb_frame->data,
rgb_frame->linesize, 0, c->height,
current_frame->data, current_frame->linesize);
delete_picture(rgb_frame);

View File

@ -2306,9 +2306,6 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot)
static int game_property_clear_exec(bContext *C, wmOperator *op)
{
Object *ob=ED_object_active_context(C);
bProperty *prop;
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
free_properties(&ob_iter->prop);
}

View File

@ -132,8 +132,7 @@ static void error(const char *dummy, ...) {}
static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int startx, int *starty);
static void outliner_do_object_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb,
void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *));
static void outliner_do_group_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb,
void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *));
static int group_select_flag(Group *gr);
/* ******************** PERSISTANT DATA ***************** */
@ -3330,31 +3329,6 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li
}
}
static void outliner_do_group_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb,
void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
{
TreeElement *te;
TreeStoreElem *tselem;
for(te=lb->first; te; te= te->next) {
tselem= TREESTORE(te);
if(tselem->flag & TSE_SELECTED) {
if(tselem->type==0 && te->idcode==ID_GR) {
/* when objects selected in other scenes... dunno if that should be allowed */
Scene *sce= (Scene *)outliner_search_back(soops, te, ID_SCE);
if(sce && scene != sce) {
ED_screen_set_scene(C, sce);
}
operation_cb(C, scene, te, NULL, tselem);
}
}
if((tselem->flag & TSE_CLOSED)==0) {
outliner_do_group_operation(C, scene, soops, &te->subtree, operation_cb);
}
}
}
void outliner_del(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops)
{

View File

@ -816,7 +816,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
unsigned char* top;
sws_scale(anim->img_convert_ctx,
(const uint8_t * const *)input->data,
(uint8_t **)input->data,
input->linesize,
0,
anim->pCodecCtx->height,
@ -875,7 +875,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
unsigned char* r;
sws_scale(anim->img_convert_ctx,
(const uint8_t * const *)input->data,
(uint8_t **)input->data,
input->linesize,
0,
anim->pCodecCtx->height,

View File

@ -118,6 +118,7 @@ typedef enum PropertySubType {
PROP_QUATERNION = 27,
PROP_AXISANGLE = 28,
PROP_XYZ = 29,
PROP_XYZ_LENGTH = 29|PROP_UNIT_LENGTH,
PROP_COLOR_GAMMA = 30,
/* booleans */

View File

@ -1630,7 +1630,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Scale", "Scaling of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_Object_dimensions_get", "rna_Object_dimensions_set", NULL);
RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object");

View File

@ -2907,7 +2907,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
RNA_def_property_update(prop, NC_SCENE|NC_WORLD, NULL);
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);

View File

@ -976,7 +976,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "localvd");
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility");
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL);
RNA_def_property_ui_text(prop, "3D Cursor Location", "3D cursor location for this view (dependent on local view setting)");

View File

@ -86,17 +86,19 @@ static PyObject *bpy_prop_deferred_return(void *func, PyObject *kw)
return ret;
}
#if 0
static int bpy_struct_id_used(StructRNA *srna, char *identifier)
{
PointerRNA ptr;
RNA_pointer_create(NULL, srna, NULL, &ptr);
return (RNA_struct_find_property(&ptr, identifier) != NULL);
}
#endif
/* Function that sets RNA, NOTE - self is NULL when called from python, but being abused from C so we can pass the srna allong
* This isnt incorrect since its a python object - but be careful */
static char BPy_BoolProperty_doc[] =
char BPy_BoolProperty_doc[] =
".. function:: BoolProperty(name=\"\", description=\"\", default=False, options={'ANIMATABLE'}, subtype='NONE')\n"
"\n"
" Returns a new boolean property definition.\n"
@ -162,7 +164,7 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw)
}
}
static char BPy_BoolVectorProperty_doc[] =
char BPy_BoolVectorProperty_doc[] =
".. function:: BoolVectorProperty(name=\"\", description=\"\", default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3)\n"
"\n"
" Returns a new vector boolean property definition.\n"
@ -238,7 +240,7 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
}
}
static char BPy_IntProperty_doc[] =
char BPy_IntProperty_doc[] =
".. function:: IntProperty(name=\"\", description=\"\", default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE')\n"
"\n"
" Returns a new int property definition.\n"
@ -304,7 +306,7 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw)
}
}
static char BPy_IntVectorProperty_doc[] =
char BPy_IntVectorProperty_doc[] =
".. function:: IntVectorProperty(name=\"\", description=\"\", default=(0, 0, 0), min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3)\n"
"\n"
" Returns a new vector int property definition.\n"
@ -382,7 +384,7 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
}
static char BPy_FloatProperty_doc[] =
char BPy_FloatProperty_doc[] =
".. function:: FloatProperty(name=\"\", description=\"\", default=0.0, min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', unit='NONE')\n"
"\n"
" Returns a new float property definition.\n"
@ -458,7 +460,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
}
}
static char BPy_FloatVectorProperty_doc[] =
char BPy_FloatVectorProperty_doc[] =
".. function:: FloatVectorProperty(name=\"\", description=\"\", default=(0.0, 0.0, 0.0), min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', size=3)\n"
"\n"
" Returns a new vector float property definition.\n"
@ -535,7 +537,7 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
}
}
static char BPy_StringProperty_doc[] =
char BPy_StringProperty_doc[] =
".. function:: StringProperty(name=\"\", description=\"\", default=\"\", maxlen=0, options={'ANIMATABLE'}, subtype='NONE')\n"
"\n"
" Returns a new string property definition.\n"
@ -646,7 +648,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *value, const char *def, in
return items;
}
static char BPy_EnumProperty_doc[] =
char BPy_EnumProperty_doc[] =
".. function:: EnumProperty(items, name=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n"
"\n"
" Returns a new enumerator property definition.\n"
@ -730,7 +732,7 @@ static StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix
return srna;
}
static char BPy_PointerProperty_doc[] =
char BPy_PointerProperty_doc[] =
".. function:: PointerProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n"
"\n"
" Returns a new pointer property definition.\n"
@ -790,7 +792,7 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw)
return NULL;
}
static char BPy_CollectionProperty_doc[] =
char BPy_CollectionProperty_doc[] =
".. function:: CollectionProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n"
"\n"
" Returns a new collection property definition.\n"
@ -850,7 +852,7 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
return NULL;
}
static char BPy_RemoveProperty_doc[] =
char BPy_RemoveProperty_doc[] =
".. function:: RemoveProperty(attr)\n"
"\n"
" Removes a dynamically defined property.\n"

View File

@ -43,6 +43,18 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw);
PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw);
extern char BPy_BoolProperty_doc[];
extern char BPy_BoolVectorProperty_doc[];
extern char BPy_IntProperty_doc[];
extern char BPy_IntVectorProperty_doc[];
extern char BPy_FloatProperty_doc[];
extern char BPy_FloatVectorProperty_doc[];
extern char BPy_StringProperty_doc[];
extern char BPy_EnumProperty_doc[];
extern char BPy_PointerProperty_doc[];
extern char BPy_CollectionProperty_doc[];\
extern char BPy_RemoveProperty_doc[];
#define PYRNA_STACK_ARRAY 32
#endif

View File

@ -204,7 +204,7 @@ int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int
return 0;
}
#define PROP_ALL_VECTOR_SUBTYPES PROP_TRANSLATION: case PROP_DIRECTION: case PROP_VELOCITY: case PROP_ACCELERATION: case PROP_XYZ: case PROP_XYZ|PROP_UNIT_LENGTH
#define PROP_ALL_VECTOR_SUBTYPES PROP_TRANSLATION: case PROP_DIRECTION: case PROP_VELOCITY: case PROP_ACCELERATION: case PROP_XYZ: case PROP_XYZ_LENGTH
PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
{
@ -3790,18 +3790,18 @@ PyTypeObject pyrna_prop_collection_Type = {
};
static struct PyMethodDef pyrna_struct_subtype_methods[] = {
{"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolProperty_doc},
{"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolVectorProperty_doc},
{"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntProperty_doc},
{"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntVectorProperty_doc},
{"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatProperty_doc},
{"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatVectorProperty_doc},
{"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, BPy_StringProperty_doc},
{"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, BPy_EnumProperty_doc},
{"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, BPy_PointerProperty_doc},
{"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, BPy_CollectionProperty_doc},
{"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, BPy_RemoveProperty_doc},
// {"__get_rna", (PyCFunction)BPy_GetStructRNA, METH_NOARGS, ""},
{NULL, NULL, 0, NULL}

View File

@ -32,8 +32,8 @@
SCA_PythonMouse::SCA_PythonMouse(SCA_IInputDevice* mouse, RAS_ICanvas* canvas)
: PyObjectPlus(),
m_canvas(canvas),
m_mouse(mouse)
m_mouse(mouse),
m_canvas(canvas)
{
}

View File

@ -115,7 +115,7 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI
{
PyObject *pyRasty = PyCObject_FromVoidPtr((void*)rasty, NULL); /* new reference */
PyObject *pyCachingInfo = PyCObject_FromVoidPtr((void*) &cachingInfo, NULL); /* new reference */
PyObject *ret = PyObject_CallMethod(m_pymaterial, "activate", "(NNO)", pyRasty, pyCachingInfo, (PyObject*) this->m_proxy);
PyObject *ret = PyObject_CallMethod(m_pymaterial, (char *)"activate", (char *)"(NNO)", pyRasty, pyCachingInfo, (PyObject*) this->m_proxy);
if (ret)
{
bool value = PyLong_AsSsize_t(ret);

View File

@ -63,11 +63,6 @@ void NG_LoopBackNetworkDeviceInterface::NextFrame()
m_currentQueue=1-m_currentQueue;
}
STR_String NG_LoopBackNetworkDeviceInterface::GetNetworkVersion()
{
return LOOPBACK_NETWORK_VERSION;
}
void NG_LoopBackNetworkDeviceInterface::SendNetworkMessage(NG_NetworkMessage* nwmsg)
{
#ifdef NAN_NET_DEBUG

View File

@ -34,11 +34,7 @@
#include "NG_NetworkDeviceInterface.h"
class NG_LoopBackNetworkDeviceInterface : public NG_NetworkDeviceInterface
{
enum {
LOOPBACK_NETWORK_VERSION=28022001
};
{
std::deque<NG_NetworkMessage*> m_messages[2];
int m_currentQueue;
@ -58,8 +54,6 @@ public:
virtual void SendNetworkMessage(class NG_NetworkMessage* msg);
virtual vector<NG_NetworkMessage*> RetrieveNetworkMessages();
STR_String GetNetworkVersion();
};
#endif //NG_LOOPBACKNETWORKDEVICEINTERFACE_H

View File

@ -70,12 +70,6 @@ public:
*/
virtual std::vector<NG_NetworkMessage*> RetrieveNetworkMessages()=0;
/**
* number of messages in device hash for this frame
*/
virtual STR_String GetNetworkVersion(void)=0;
#ifdef WITH_CXX_GUARDEDALLOC

View File

@ -56,8 +56,6 @@ public:
void SendNetworkMessage(NG_NetworkMessage* nwmsg);
vector<NG_NetworkMessage*> RetrieveNetworkMessages(void);
STR_String GetNetworkVersion(void);
int mytest(void);
};

View File

@ -676,7 +676,7 @@ error:
// Return a empty buffer to avoid a crash in Python 3.1
// The bug is fixed in Python SVN 77916, as soon as the python revision used by Blender is
// updated, you can simply return -1 and set the error
static char* buf = "";
static char* buf = (char *)"";
ret = PyBuffer_FillInfo(view, (PyObject*)self, buf, 0, 0, flags);
if (ret >= 0)
self->m_image->m_exports++;

View File

@ -23,7 +23,9 @@ http://www.gnu.org/copyleft/lesser.txt.
#ifdef WITH_FFMPEG
// INT64_C fix for some linux machines (C99ism)
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include <stdint.h>
@ -937,7 +939,6 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
if (position != m_curPosition + 1)
{
int64_t pos = (int64_t)((position - m_preseek) / (m_baseFrameRate*timeBase));
int seekres;
if (pos < 0)
pos = 0;