Fix for a number of compiler warnings as well as a bug hidden by the warnings.

Patch contribution by Bastien Montagne, thanks!
This commit is contained in:
Tamito Kajiyama 2012-12-08 22:24:41 +00:00
parent ec33687d6c
commit 3c4987f983
25 changed files with 75 additions and 75 deletions

View File

@ -42,7 +42,7 @@
struct Main;
struct Object;
FreestyleLineStyle *FRS_new_linestyle(char *name, struct Main *main);
FreestyleLineStyle *FRS_new_linestyle(const char *name, struct Main *main);
void FRS_free_linestyle(FreestyleLineStyle *linestyle);
FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle);

View File

@ -48,7 +48,7 @@
#include "BLI_blenlib.h"
static char *modifier_name[LS_MODIFIER_NUM] = {
static const char *modifier_name[LS_MODIFIER_NUM] = {
NULL,
"Along Stroke",
"Distance from Camera",
@ -95,7 +95,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->caps = LS_CAPS_BUTT;
}
FreestyleLineStyle *FRS_new_linestyle(char *name, struct Main *main)
FreestyleLineStyle *FRS_new_linestyle(const char *name, struct Main *main)
{
FreestyleLineStyle *linestyle;

View File

@ -6550,7 +6550,7 @@ static void direct_link_linestyle_thickness_modifier(FileData *fd, LineStyleModi
}
}
static void direct_link_linestyle_geometry_modifier(FileData *fd, LineStyleModifier *modifier)
static void direct_link_linestyle_geometry_modifier(FileData *UNUSED(fd), LineStyleModifier *UNUSED(modifier))
{
}

View File

@ -2876,7 +2876,7 @@ static void write_masks(WriteData *wd, ListBase *idbase)
static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
char *struct_name;
const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@ -2918,7 +2918,7 @@ static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
char *struct_name;
const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@ -2960,7 +2960,7 @@ static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
char *struct_name;
const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@ -3005,7 +3005,7 @@ static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifie
static void write_linestyle_geometry_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
char *struct_name;
const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {

View File

@ -2014,13 +2014,13 @@ static bAnimChannelType ACF_DSNTREE =
/* LineStyle Expander ------------------------------------------- */
// TODO: just get this from RNA?
static int acf_dslinestyle_icon(bAnimListElem *ale)
static int acf_dslinestyle_icon(bAnimListElem *UNUSED(ale))
{
return ICON_BRUSH_DATA; /* FIXME */
}
/* get the appropriate flag(s) for the setting when it is valid */
static int acf_dslinestyle_setting_flag(bAnimContext *ac, int setting, short *neg)
static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
*neg= 0;

View File

@ -703,7 +703,7 @@ static int freestyle_active_lineset_poll(bContext *C)
return FRS_get_active_lineset(&srl->freestyleConfig) != NULL;
}
static int freestyle_lineset_copy_exec(bContext *C, wmOperator *op)
static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
@ -730,7 +730,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int freestyle_lineset_paste_exec(bContext *C, wmOperator *op)
static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);

View File

@ -630,7 +630,7 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
cleanVertices[detri.viP+2] += 1e-5 * detri.v.z();
}
}
printf("Warning: Object %s contains %d degenerate triangle%s (strokes may be incorrect)\n",
printf("Warning: Object %s contains %lu degenerated triangle%s (strokes may be incorrect)\n",
name, detriList.size(), (detriList.size() > 1) ? "s" : "");
}

View File

@ -56,8 +56,8 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count)
freestyle_scene->r.ysch= re->recty; // old_scene->r.ysch
freestyle_scene->r.xasp= 1.f; // old_scene->r.xasp;
freestyle_scene->r.yasp= 1.f; // old_scene->r.yasp;
freestyle_scene->r.xparts= old_scene->r.xparts;
freestyle_scene->r.yparts= old_scene->r.yparts;
freestyle_scene->r.tilex= old_scene->r.tilex;
freestyle_scene->r.tiley= old_scene->r.tiley;
freestyle_scene->r.size= 100; // old_scene->r.size
freestyle_scene->r.maximsize= old_scene->r.maximsize;
freestyle_scene->r.ocres = old_scene->r.ocres;

View File

@ -55,17 +55,17 @@ static Vector2 V2SubII(Vector2 a, Vector2 b);
#define MAXPOINTS 1000 /* The most points you can have */
/* returns squared length of input vector */
double V2SquaredLength(Vector2 *a)
static double V2SquaredLength(Vector2 *a)
{ return(((*a)[0] * (*a)[0])+((*a)[1] * (*a)[1]));
}
/* returns length of input vector */
double V2Length(Vector2 *a)
static double V2Length(Vector2 *a)
{
return(sqrt(V2SquaredLength(a)));
}
Vector2 *V2Scale(Vector2 *v, double newlen)
static Vector2 *V2Scale(Vector2 *v, double newlen)
{
double len = V2Length(v);
if (len != 0.0) { (*v)[0] *= newlen/len; (*v)[1] *= newlen/len; }
@ -73,13 +73,13 @@ Vector2 *V2Scale(Vector2 *v, double newlen)
}
/* return the dot product of vectors a and b */
double V2Dot(Vector2 *a, Vector2 *b)
static double V2Dot(Vector2 *a, Vector2 *b)
{
return(((*a)[0]*(*b)[0])+((*a)[1]*(*b)[1]));
}
/* return the distance between two points */
double V2DistanceBetween2Points(Vector2 *a, Vector2 *b)
static double V2DistanceBetween2Points(Vector2 *a, Vector2 *b)
{
double dx = (*a)[0] - (*b)[0];
double dy = (*a)[1] - (*b)[1];
@ -87,14 +87,14 @@ double dy = (*a)[1] - (*b)[1];
}
/* return vector sum c = a+b */
Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c)
static Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c)
{
(*c)[0] = (*a)[0]+(*b)[0]; (*c)[1] = (*a)[1]+(*b)[1];
return(c);
}
/* normalizes the input vector and returns it */
Vector2 *V2Normalize(Vector2 *v)
static Vector2 *V2Normalize(Vector2 *v)
{
double len = V2Length(v);
if (len != 0.0) { (*v)[0] /= len; (*v)[1] /= len; }
@ -102,7 +102,7 @@ double len = V2Length(v);
}
/* negates the input vector and returns it */
Vector2 *V2Negate(Vector2 *v)
static Vector2 *V2Negate(Vector2 *v)
{
(*v)[0] = -(*v)[0]; (*v)[1] = -(*v)[1];
return(v);

View File

@ -30,7 +30,7 @@ void allOccludersGridVisitor::examineOccluder(Polygon3r *occ){
occluders_.push_back(occ);
}
bool inBox(const Vec3r& inter, const Vec3r& box_min, const Vec3r& box_max){
static bool inBox(const Vec3r& inter, const Vec3r& box_min, const Vec3r& box_max){
if(((inter.x()>=box_min.x()) && (inter.x() <box_max.x()))
&& ((inter.y()>=box_min.y()) && (inter.y() <box_max.y()))
&& ((inter.z()>=box_min.z()) && (inter.z() <box_max.z()))

View File

@ -58,7 +58,7 @@
r0 = t - (int)t;\
r1 = r0 - 1.;
void normalize2(float v[2])
static void normalize2(float v[2])
{
float s;
@ -67,7 +67,7 @@ void normalize2(float v[2])
v[1] = v[1] / s;
}
void normalize3(float v[3])
static void normalize3(float v[3])
{
float s;

View File

@ -55,9 +55,9 @@ static char Id___doc__[] =
static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds)
{
int first = 0, second = 0;
static char *kwlist[] = {"first", "second", NULL};
static const char *kwlist[] = {"first", "second", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &first, &second) )
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char**)kwlist, &first, &second) )
return -1;
self->id = new Id( first, second );

View File

@ -50,7 +50,7 @@ int Director_BPy_BinaryPredicate0D___call__( BinaryPredicate0D *bp0D, Interface0
Py_XDECREF(arg2);
return -1;
}
PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, "__call__", "OO", arg1, arg2 );
PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@ -77,7 +77,7 @@ int Director_BPy_BinaryPredicate1D___call__( BinaryPredicate1D *bp1D, Interface1
Py_XDECREF(arg2);
return -1;
}
PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, "__call__", "OO", arg1, arg2 );
PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@ -100,7 +100,7 @@ int Director_BPy_UnaryPredicate0D___call__( UnaryPredicate0D *up0D, Interface0DI
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( up0D->py_up0D, "__call__", "O", arg );
PyObject *result = PyObject_CallMethod( up0D->py_up0D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@ -122,7 +122,7 @@ int Director_BPy_UnaryPredicate1D___call__( UnaryPredicate1D *up1D, Interface1D&
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( up1D->py_up1D, "__call__", "O", arg );
PyObject *result = PyObject_CallMethod( up1D->py_up1D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@ -144,7 +144,7 @@ int Director_BPy_StrokeShader_shade( StrokeShader *ss, Stroke& s ) {
PyObject *arg = BPy_Stroke_from_Stroke(s);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( ss->py_ss, "shade", "O", arg );
PyObject *result = PyObject_CallMethod( ss->py_ss, (char*)"shade", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@ -158,7 +158,7 @@ int Director_BPy_ChainingIterator_init( ChainingIterator *c_it ) {
PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
return -1;
}
PyObject *result = PyObject_CallMethod( c_it->py_c_it, "init", "");
PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"init", NULL);
if (!result)
return -1;
Py_DECREF(result);
@ -173,7 +173,7 @@ int Director_BPy_ChainingIterator_traverse( ChainingIterator *c_it, AdjacencyIte
PyObject *arg = BPy_AdjacencyIterator_from_AdjacencyIterator(a_it);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( c_it->py_c_it, "traverse", "O", arg );
PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"traverse", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@ -201,7 +201,7 @@ int Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@ -261,7 +261,7 @@ int Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;

View File

@ -37,7 +37,7 @@ static char Chain___doc__[] =
" :arg id: An Id object.\n"
" :type id: :class:`Id`\n";
int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
static int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
{
PyObject *obj = 0;
@ -77,7 +77,7 @@ static char Chain_push_viewedge_back___doc__[] =
" processed.\n"
" :type orientation: bool\n";
PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
static PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))
@ -101,7 +101,7 @@ static char Chain_push_viewedge_front___doc__[] =
" processed.\n"
" :type orientation: bool\n";
PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
static PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))

View File

@ -68,7 +68,7 @@ static char CurvePointIterator_t___doc__[] =
" :return: The curvilinear abscissa.\n"
" :rtype: float\n";
PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
return PyFloat_FromDouble( self->cp_it->t() );
}

View File

@ -52,7 +52,7 @@ static char UnaryFunction1DVec3f___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj = 0;
@ -69,7 +69,7 @@ int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args
return 0;
}
void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
{
if (self->uf1D_vec3f)
delete self->uf1D_vec3f;
@ -77,7 +77,7 @@ void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
}
PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
{
return PyUnicode_FromFormat("type: %s - address: %p", self->uf1D_vec3f->getName().c_str(), self->uf1D_vec3f );
}
@ -90,12 +90,12 @@ static char UnaryFunction1DVec3f_getName___doc__[] =
" :return: The name of the unary 1D function.\n"
" :rtype: str\n";
PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
static PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
{
return PyUnicode_FromString( self->uf1D_vec3f->getName().c_str() );
}
PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
{
PyObject *obj;
@ -129,7 +129,7 @@ static char UnaryFunction1DVec3f_setIntegrationType___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
static PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj;
@ -148,7 +148,7 @@ static char UnaryFunction1DVec3f_getIntegrationType___doc__[] =
" :return: The integration method.\n"
" :rtype: :class:`IntegrationType`\n";
PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
static PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
return BPy_IntegrationType_from_IntegrationType( self->uf1D_vec3f->getIntegrationType() );
}

View File

@ -2,7 +2,7 @@
#include "NodeCamera.h"
#include <math.h>
void loadIdentity(double * matrix){
static void loadIdentity(double * matrix){
int i;
// Build Identity matrix

View File

@ -245,7 +245,7 @@ void Smoother::smooth(int nbIteration, real iFactorPoint, real ifactorCurvature,
copyVertices();
}
real edgeStopping (real x, real sigma)
static real edgeStopping (real x, real sigma)
{
if (sigma==0.0) return 1.0;
return exp(-x*x/(sigma*sigma));

View File

@ -50,7 +50,7 @@ extern "C" {
// (*oArray)[i] = ((float)qBlue(rgb))/255.f;
// }
// }
void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) {
static void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) {
oSize = imBuf->x;
*oArray = new float[oSize];

View File

@ -643,8 +643,8 @@ error:
#include "CurveIterators.h"
// Internal function
int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling,
Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling,
Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
{
if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){
newChains.push_back(_curve);
@ -796,8 +796,8 @@ int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& p
// recursive split with pred 0D
int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling,
Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling,
Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
{
if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){
newChains.push_back(_curve);
@ -992,7 +992,7 @@ int Operators::sort(BinaryPredicate1D& pred) {
return 0;
}
Stroke* createStroke(Interface1D& inter) {
static Stroke* createStroke(Interface1D& inter) {
Stroke* stroke = new Stroke;
stroke->setId(inter.getId());

View File

@ -78,13 +78,13 @@ Strip::~Strip(){
#define MAX_RATIO_LENGTH_SINGU 2
#define HUGE_COORD 1e4
bool notValid (Vec2r p)
static bool notValid (Vec2r p)
{
return (p[0]!=p[0]) || (p[1]!=p[1]) || (fabs(p[0])>HUGE_COORD) || (fabs(p[1])>HUGE_COORD)
|| (p[0] <-HUGE_COORD) || (p[1]<-HUGE_COORD);
}
real crossP(const Vec2r& A, const Vec2r& B){
static real crossP(const Vec2r& A, const Vec2r& B){
return A[0]*B[1] - A[1]*B[0];
}

View File

@ -50,7 +50,7 @@ PseudoNoise::linearNoise (real x)
return x1*(1-t)+x2*t;
}
real
static real
LanczosWindowed(real t)
{
if (fabs(t)>2) return 0;

View File

@ -262,7 +262,7 @@ ViewVertex * ViewMap::InsertViewVertex(SVertex *iVertex,
/**********************************/
// is dve1 before dve2 ? (does it have a smaller angle ?)
bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEdge& dve2){
static bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEdge& dve2){
FEdge *fe1;
if(dve1.second)
fe1 = dve1.first->fedgeB();

View File

@ -124,7 +124,7 @@ namespace ViewMapIO {
}
int load(istream& in, ViewShape* vs) {
static int load(istream& in, ViewShape* vs) {
if (!vs || !vs->sshape())
return 1;
@ -203,7 +203,7 @@ namespace ViewMapIO {
}
int load(istream& in, FEdge* fe) {
static int load(istream& in, FEdge* fe) {
if (!fe)
return 1;
@ -317,7 +317,7 @@ namespace ViewMapIO {
}
int load(istream& in, SVertex* sv) {
static int load(istream& in, SVertex* sv) {
if (!sv)
return 1;
@ -371,7 +371,7 @@ namespace ViewMapIO {
}
int load(istream& in, ViewEdge* ve) {
static int load(istream& in, ViewEdge* ve) {
if (!ve)
return 1;
@ -438,7 +438,7 @@ namespace ViewMapIO {
}
int load(istream& in, ViewVertex* vv) {
static int load(istream& in, ViewVertex* vv) {
if (!vv)
return 1;
@ -597,7 +597,7 @@ namespace ViewMapIO {
}
int save(ostream& out, ViewShape* vs) {
static int save(ostream& out, ViewShape* vs) {
if (!vs || !vs->sshape()) {
cerr << "Warning: null ViewShape" << endl;
@ -667,7 +667,7 @@ namespace ViewMapIO {
}
int save(ostream& out, FEdge* fe) {
static int save(ostream& out, FEdge* fe) {
if (!fe) {
cerr << "Warning: null FEdge" << endl;
@ -752,7 +752,7 @@ namespace ViewMapIO {
}
int save(ostream& out, SVertex* sv) {
static int save(ostream& out, SVertex* sv) {
if (!sv) {
cerr << "Warning: null SVertex" << endl;
@ -805,7 +805,7 @@ namespace ViewMapIO {
}
int save(ostream& out, ViewEdge* ve) {
static int save(ostream& out, ViewEdge* ve) {
if (!ve) {
cerr << "Warning: null ViewEdge" << endl;
@ -859,7 +859,7 @@ namespace ViewMapIO {
}
int save(ostream& out, ViewVertex* vv) {
static int save(ostream& out, ViewVertex* vv) {
if (!vv) {
cerr << "Warning: null ViewVertex" << endl;

View File

@ -1466,12 +1466,12 @@ static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
}
static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max)
static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
{
FreestyleConfig *config= (FreestyleConfig *)ptr->data;
*min= 0;
*max= BLI_countlist(&config->linesets)-1;
*max= MAX2(0, *max);
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
*min = 0;
*max = max_ii(0, BLI_countlist(&config->linesets) - 1);
}
static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)