Commit e22c320d authored by Sean McBride's avatar Sean McBride Committed by Code Review
Browse files

Merge topic 'Weverything' into master

1348962f Made private functions static
82a84473 Made private functions static
66693916 Removed unused function, make private functions static
parents 99101fdf 1348962f
......@@ -26,7 +26,7 @@ static const char *vtkDebugLeaksIgnoreClasses[] = {
//----------------------------------------------------------------------------
// return 1 if the class should be ignored
int vtkDebugLeaksIgnoreClassesCheck(const char* s)
static int vtkDebugLeaksIgnoreClassesCheck(const char* s)
{
int i =0;
while(vtkDebugLeaksIgnoreClasses[i])
......@@ -44,7 +44,7 @@ vtkStandardNewMacro(vtkDebugLeaks);
//----------------------------------------------------------------------------
// A hash function for converting a string to a long
inline size_t vtkHashString(const char* s)
static inline size_t vtkHashString(const char* s)
{
unsigned long h = 0;
for ( ; *s; ++s)
......
......@@ -23,35 +23,16 @@
const unsigned int BIT_INCREMENT = 32;
int maximum(int a, int b)
static int maximum(int a, int b)
{
return a > b ? a : b;
}
int minimum(int a, int b)
static int minimum(int a, int b)
{
return a < b ? a : b;
}
long vtkpow(long a, long b)
{
long a1 = a;
long b1 = b;
long c = 1;
while (b1 >= 1)
{
while ( ( b & 1 ) == 0)
{
b1 = b1 / 2;
a1 = a1 * a1;
}
b1 = b1 - 1;
c = c * a1;
}
return c;
}
void vtkLargeInteger::Contract()
{
while (this->Number[this->Sig] == 0 && this->Sig > 0)
......
......@@ -80,7 +80,7 @@ static PyObject *PyVTKObject_Repr(PyObject *op)
}
//--------------------------------------------------------------------
int PyVTKObject_SetAttr(PyObject *op, PyObject *attr, PyObject *value)
static int PyVTKObject_SetAttr(PyObject *op, PyObject *attr, PyObject *value)
{
PyVTKObject *self = (PyVTKObject *)op;
char *name = PyString_AsString(attr);
......
......@@ -220,7 +220,7 @@ inline bool vtkPythonGetStdStringValue(PyObject *o, std::string &a, const char *
//--------------------------------------------------------------------
// Overloaded methods, mostly based on the above templates
bool vtkPythonGetValue(PyObject *o, const void *&a)
static bool vtkPythonGetValue(PyObject *o, const void *&a)
{
PyBufferProcs *b = o->ob_type->tp_as_buffer;
if (b && b->bf_getreadbuffer && b->bf_getsegcount)
......
......@@ -144,9 +144,9 @@ bool vtkPythonOverloadHelper::next(const char **format, const char **classname)
#if VTK_SIZEOF_LONG != VTK_SIZEOF_INT
#ifdef PY_LONG_LONG
int vtkPythonIntPenalty(PY_LONG_LONG tmpi, int penalty, char format)
static int vtkPythonIntPenalty(PY_LONG_LONG tmpi, int penalty, char format)
#else
int vtkPythonIntPenalty(long tmpi, int penalty, char format)
static int vtkPythonIntPenalty(long tmpi, int penalty, char format)
#endif
{
if (tmpi > VTK_INT_MAX || tmpi < VTK_INT_MIN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment