[Bf-blender-cvs] [fd09e68] blender-v2.75-release: Compilation error fixes for older GCC/CLang compilers

Sergey Sharybin noreply at git.blender.org
Thu Jun 18 17:37:09 CEST 2015


Commit: fd09e68363baced7d84f489fe017c083d4b8f628
Author: Sergey Sharybin
Date:   Sat Jun 13 22:17:32 2015 +0200
Branches: blender-v2.75-release
https://developer.blender.org/rBfd09e68363baced7d84f489fe017c083d4b8f628

Compilation error fixes for older GCC/CLang compilers

Avoid data type re-declaration, it's not really working on current FreeBSD's 9
system and CLang-3.0 from OSX.

This is not a good idea to do such sort of copy-paste anyway.

If someone knows better way of dealing with this please go ahead and correct
the code :)

===================================================================

M	source/blender/blenkernel/intern/data_transfer_intern.h
M	source/blender/blenlib/BLI_astar.h
M	source/blender/blenlib/intern/astar.c

===================================================================

diff --git a/source/blender/blenkernel/intern/data_transfer_intern.h b/source/blender/blenkernel/intern/data_transfer_intern.h
index dec27d2..501b749 100644
--- a/source/blender/blenkernel/intern/data_transfer_intern.h
+++ b/source/blender/blenkernel/intern/data_transfer_intern.h
@@ -31,6 +31,8 @@
 #ifndef __DATA_TRANSFER_INTERN_H__
 #define __DATA_TRANSFER_INTERN_H__
 
+#include "BKE_customdata.h"  /* For cd_datatransfer_interp */
+
 struct CustomDataTransferLayerMap;
 struct CustomData;
 struct ListBase;
@@ -38,11 +40,6 @@ struct ListBase;
 float data_transfer_interp_float_do(
         const int mix_mode, const float val_dst, const float val_src, const float mix_factor);
 
-/* Copied from BKE_customdata.h :( */
-typedef void (*cd_datatransfer_interp)(
-        const struct CustomDataTransferLayerMap *laymap, void *dest,
-        const void **sources, const float *weights, const int count, const float mix_factor);
-
 void data_transfer_layersmapping_add_item(
         struct ListBase *r_map, const int data_type, const int mix_mode,
         const float mix_factor, const float *mix_weights,
diff --git a/source/blender/blenlib/BLI_astar.h b/source/blender/blenlib/BLI_astar.h
index b99a253..5e9434a 100644
--- a/source/blender/blenlib/BLI_astar.h
+++ b/source/blender/blenlib/BLI_astar.h
@@ -86,6 +86,15 @@ void BLI_astar_solution_init(BLI_AStarGraph *as_graph, BLI_AStarSolution *as_sol
 void BLI_astar_solution_clear(BLI_AStarSolution *as_solution);
 void BLI_astar_solution_free(BLI_AStarSolution *as_solution);
 
+/**
+ * Callback computing the current cost (distance) to next node, and the estimated overall cost to destination node
+ * (A* expects this estimation to always be less or equal than actual shortest path from next node to destination one).
+ *
+ * \param link the graph link between current node and next one.
+ * \param node_idx_curr current node index.
+ * \param node_idx_next next node index.
+ * \param node_idx_dst destination node index.
+ */
 typedef float (*astar_f_cost)(BLI_AStarGraph *as_graph, BLI_AStarSolution *as_solution, BLI_AStarGNLink *link,
                               const int node_idx_curr, const int node_idx_next, const int node_idx_dst);
 
diff --git a/source/blender/blenlib/intern/astar.c b/source/blender/blenlib/intern/astar.c
index 311d6dd..21d974d 100644
--- a/source/blender/blenlib/intern/astar.c
+++ b/source/blender/blenlib/intern/astar.c
@@ -165,18 +165,6 @@ void BLI_astar_solution_free(BLI_AStarSolution *as_solution)
 }
 
 /**
- * Callback computing the current cost (distance) to next node, and the estimated overall cost to destination node
- * (A* expects this estimation to always be less or equal than actual shortest path from next node to destination one).
- *
- * \param link the graph link between current node and next one.
- * \param node_idx_curr current node index.
- * \param node_idx_next next node index.
- * \param node_idx_dst destination node index.
- */
-typedef float (*astar_f_cost)(BLI_AStarGraph *as_graph, BLI_AStarSolution *as_solution, BLI_AStarGNLink *link,
-                              const int node_idx_curr, const int node_idx_next, const int node_idx_dst);
-
-/**
  * Init an A* graph. Total number of nodes must be known.
  *
  * Nodes might be e.g. vertices, faces, ...




More information about the Bf-blender-cvs mailing list