[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53747] trunk/blender/source: patch from Harley Acheson to remove multiple inline defines.
Campbell Barton
ideasman42 at gmail.com
Sat Jan 12 18:12:49 CET 2013
Revision: 53747
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53747
Author: campbellbarton
Date: 2013-01-12 17:12:48 +0000 (Sat, 12 Jan 2013)
Log Message:
-----------
patch from Harley Acheson to remove multiple inline defines.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/BKE_colortools.h
trunk/blender/source/blender/blenkernel/intern/CCGSubSurf.c
trunk/blender/source/blender/blenkernel/intern/colortools.c
trunk/blender/source/blender/nodes/intern/node_util.h
trunk/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
Modified: trunk/blender/source/blender/blenkernel/BKE_colortools.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_colortools.h 2013-01-12 17:07:49 UTC (rev 53746)
+++ trunk/blender/source/blender/blenkernel/BKE_colortools.h 2013-01-12 17:12:48 UTC (rev 53747)
@@ -42,14 +42,6 @@
struct ImBuf;
struct rctf;
-#if defined _MSC_VER
-# define DO_INLINE __inline
-#elif defined(__sun) || defined(__sun__)
-# define DO_INLINE
-#else
-# define DO_INLINE static inline
-#endif
-
void curvemapping_set_defaults(struct CurveMapping *cumap, int tot, float minx, float miny, float maxx, float maxy);
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
void curvemapping_free_data(struct CurveMapping *cumap);
Modified: trunk/blender/source/blender/blenkernel/intern/CCGSubSurf.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/CCGSubSurf.c 2013-01-12 17:07:49 UTC (rev 53746)
+++ trunk/blender/source/blender/blenkernel/intern/CCGSubSurf.c 2013-01-12 17:12:48 UTC (rev 53747)
@@ -16,12 +16,6 @@
#include "BLI_utildefines.h" /* for BLI_assert */
-#ifdef _MSC_VER
-# define CCG_INLINE __inline
-#else
-# define CCG_INLINE inline
-#endif
-
/* used for normalize_v3 in BLI_math_vector
* float.h's FLT_EPSILON causes trouble with subsurf normals - campbell */
#define EPSILON (1.0e-35f)
@@ -305,7 +299,7 @@
// byte *userData;
};
-static CCG_INLINE byte *VERT_getLevelData(CCGVert *v)
+BLI_INLINE byte *VERT_getLevelData(CCGVert *v)
{
return (byte *)(&(v)[1]);
}
@@ -324,7 +318,7 @@
// byte *userData;
};
-static CCG_INLINE byte *EDGE_getLevelData(CCGEdge *e)
+BLI_INLINE byte *EDGE_getLevelData(CCGEdge *e)
{
return (byte *)(&(e)[1]);
}
@@ -342,17 +336,17 @@
// byte *userData;
};
-static CCG_INLINE CCGVert **FACE_getVerts(CCGFace *f)
+BLI_INLINE CCGVert **FACE_getVerts(CCGFace *f)
{
return (CCGVert **)(&f[1]);
}
-static CCG_INLINE CCGEdge **FACE_getEdges(CCGFace *f)
+BLI_INLINE CCGEdge **FACE_getEdges(CCGFace *f)
{
return (CCGEdge **)(&(FACE_getVerts(f)[f->numVerts]));
}
-static CCG_INLINE byte *FACE_getCenterData(CCGFace *f)
+BLI_INLINE byte *FACE_getCenterData(CCGFace *f)
{
return (byte *)(&(FACE_getEdges(f)[(f)->numVerts]));
}
@@ -698,28 +692,28 @@
return f;
}
-static CCG_INLINE void *_face_getIECo(CCGFace *f, int lvl, int S, int x, int levels, int dataSize)
+BLI_INLINE void *_face_getIECo(CCGFace *f, int lvl, int S, int x, int levels, int dataSize)
{
int maxGridSize = ccg_gridsize(levels);
int spacing = ccg_spacing(levels, lvl);
byte *gridBase = FACE_getCenterData(f) + dataSize * (1 + S * (maxGridSize + maxGridSize * maxGridSize));
return &gridBase[dataSize * x * spacing];
}
-static CCG_INLINE void *_face_getIENo(CCGFace *f, int lvl, int S, int x, int levels, int dataSize, int normalDataOffset)
+BLI_INLINE void *_face_getIENo(CCGFace *f, int lvl, int S, int x, int levels, int dataSize, int normalDataOffset)
{
int maxGridSize = ccg_gridsize(levels);
int spacing = ccg_spacing(levels, lvl);
byte *gridBase = FACE_getCenterData(f) + dataSize * (1 + S * (maxGridSize + maxGridSize * maxGridSize));
return &gridBase[dataSize * x * spacing + normalDataOffset];
}
-static CCG_INLINE void *_face_getIFCo(CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize)
+BLI_INLINE void *_face_getIFCo(CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize)
{
int maxGridSize = ccg_gridsize(levels);
int spacing = ccg_spacing(levels, lvl);
byte *gridBase = FACE_getCenterData(f) + dataSize * (1 + S * (maxGridSize + maxGridSize * maxGridSize));
return &gridBase[dataSize * (maxGridSize + (y * maxGridSize + x) * spacing)];
}
-static CCG_INLINE float *_face_getIFNo(CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize, int normalDataOffset)
+BLI_INLINE float *_face_getIFNo(CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize, int normalDataOffset)
{
int maxGridSize = ccg_gridsize(levels);
int spacing = ccg_spacing(levels, lvl);
@@ -742,7 +736,7 @@
return i;
return -1;
}
-static CCG_INLINE void *_face_getIFCoEdge(CCGFace *f, CCGEdge *e, int f_ed_idx, int lvl, int eX, int eY, int levels, int dataSize)
+BLI_INLINE void *_face_getIFCoEdge(CCGFace *f, CCGEdge *e, int f_ed_idx, int lvl, int eX, int eY, int levels, int dataSize)
{
int maxGridSize = ccg_gridsize(levels);
int spacing = ccg_spacing(levels, lvl);
Modified: trunk/blender/source/blender/blenkernel/intern/colortools.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-01-12 17:07:49 UTC (rev 53746)
+++ trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-01-12 17:12:48 UTC (rev 53747)
@@ -895,7 +895,7 @@
#define INV_255 (1.f / 255.f)
-DO_INLINE int get_bin_float(float f)
+BLI_INLINE int get_bin_float(float f)
{
int bin = (int)((f * 255.0f) + 0.5f); /* 0.5 to prevent quantisation differences */
Modified: trunk/blender/source/blender/nodes/intern/node_util.h
===================================================================
--- trunk/blender/source/blender/nodes/intern/node_util.h 2013-01-12 17:07:49 UTC (rev 53746)
+++ trunk/blender/source/blender/nodes/intern/node_util.h 2013-01-12 17:12:48 UTC (rev 53747)
@@ -65,13 +65,3 @@
void node_update_internal_links_default(struct bNodeTree *ntree, struct bNode *node);
#endif
-
-// this is needed for inlining behavior
-#if defined _MSC_VER
-# define DO_INLINE __inline
-#elif defined (__sun) || defined (__sun__)
-# define DO_INLINE
-#else
-# define DO_INLINE static inline
-#endif
-
Modified: trunk/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp 2013-01-12 17:07:49 UTC (rev 53746)
+++ trunk/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp 2013-01-12 17:12:48 UTC (rev 53747)
@@ -1520,9 +1520,8 @@
if (m_show_debug_properties && m_propertiesPresent) {
/* Title for debugging("Debug properties") */
- debugtxt.Format("Debug Properties");
m_rendertools->RenderText2D(RAS_IRenderTools::RAS_TEXT_PADDED,
- debugtxt.ReadPtr(),
+ "Debug Properties",
xcoord + const_xindent + title_xmargin, // Adds the constant x indent (0 for now) to the title x margin
ycoord,
m_canvas->GetWidth() /* RdV, TODO ?? */,
More information about the Bf-blender-cvs
mailing list