Author: Diego Barrios Romero <[email protected]>
Date: Tue Mar 13 20:21:04 2012 +0100
Apply patch #3424218 partially. Fix compiling issues with clang compiler
Thanks to Hisashi Todd Fujinaka
---
.../src/modules/mod_magickpp/trgt_magickpp.cpp | 4 ++--
synfig-core/src/synfig/canvas.h | 12 +++++++-----
synfig-core/src/synfig/color.h | 2 ++
synfig-core/src/synfig/guidset.h | 3 +++
synfig-core/src/synfig/loadcanvas.cpp | 3 ++-
synfig-core/src/synfig/vector.h | 2 ++
6 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
index 0570685..7a13eeb 100644
--- a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+++ b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
@@ -66,7 +66,7 @@ MagickLib::Image* copy_image_list(Container& container)
try
{
- current = CloneImage(iter->image(), 0, 0,
Magick::MagickTrue, &exceptionInfo);
+ current = CloneImage(iter->image(), 0, 0, MagickTrue,
&exceptionInfo);
if (!first) first = current;
@@ -101,7 +101,7 @@ magickpp_trgt::~magickpp_trgt()
image.fileName(filename);
try
{
-
SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo);
+
SetImageInfo(image.imageInfo(),MagickTrue,&exceptionInfo);
can_adjoin = image.adjoin();
}
catch(Magick::Warning warning) {
diff --git a/synfig-core/src/synfig/canvas.h b/synfig-core/src/synfig/canvas.h
index 9190b79..c4f3432 100644
--- a/synfig-core/src/synfig/canvas.h
+++ b/synfig-core/src/synfig/canvas.h
@@ -119,6 +119,13 @@ namespace synfig {
class Context;
class GUID;
+class Canvas;
+
+typedef etl::handle<Canvas> CanvasHandle;
+
+//! Optimize layers based on its calculated Z depth to perform a quick
+//! render of the layers to the output.
+void optimize_layers(Time, Context, CanvasHandle, bool seen_motion_blur=false);
/*! \class Canvas
** \brief Canvas is a double ended queue of Layers. It is the base class
@@ -615,11 +622,6 @@ protected:
virtual void get_times_vfunc(Node::time_set &set) const;
}; // END of class Canvas
- //! Optimize layers based on its calculated Z depth to perform a quick
- //! render of the layers to the output.
-void optimize_layers(Time time, Context context, Canvas::Handle op_canvas,
bool seen_motion_blur=false);
-
-
}; // END of namespace synfig
/* === E N D =============================================================== */
diff --git a/synfig-core/src/synfig/color.h b/synfig-core/src/synfig/color.h
index fc5f680..82657d9 100644
--- a/synfig-core/src/synfig/color.h
+++ b/synfig-core/src/synfig/color.h
@@ -63,6 +63,8 @@ extern "C" { int _isnan(double x); }
inline bool isnan(double x) { return x != x; }
inline bool isnan(float x) { return x != x; }
#define SYNFIG_ISNAN_FIX 1
+#else
+#define isnan std::isnan
#endif
namespace synfig {
diff --git a/synfig-core/src/synfig/guidset.h b/synfig-core/src/synfig/guidset.h
index 32d6127..1855107 100644
--- a/synfig-core/src/synfig/guidset.h
+++ b/synfig-core/src/synfig/guidset.h
@@ -48,6 +48,9 @@ class GUIDSet : public
#ifdef HASH_SET_H
std::set<synfig::GUID>
#else
+#ifndef HAS_SET_CLASS
+#define HASH_SET_CLASS HASH_SET_NAMESPACE::hash_set
+#endif
HASH_SET_CLASS<synfig::GUID,synfig::GUIDHash>
#endif
{
diff --git a/synfig-core/src/synfig/loadcanvas.cpp
b/synfig-core/src/synfig/loadcanvas.cpp
index 375e84e..c283ddf 100644
--- a/synfig-core/src/synfig/loadcanvas.cpp
+++ b/synfig-core/src/synfig/loadcanvas.cpp
@@ -1507,7 +1507,8 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element
*element,Canvas::Handle c
}
handle<LinkableValueNode>
value_node=LinkableValueNode::create(element->get_name(),type);
- handle<ValueNode> c[value_node->link_count()];
+ //handle<ValueNode> c[value_node->link_count()]; changed because of
clang complain
+ std::vector<handle<ValueNode> > c(value_node->link_count());
if(!value_node)
{
diff --git a/synfig-core/src/synfig/vector.h b/synfig-core/src/synfig/vector.h
index 46baff8..5353e1d 100644
--- a/synfig-core/src/synfig/vector.h
+++ b/synfig-core/src/synfig/vector.h
@@ -52,6 +52,8 @@ extern "C" { int _isnan(double x); }
inline bool isnan(double x) { return x != x; }
inline bool isnan(float x) { return x != x; }
#define SYNFIG_ISNAN_FIX 1
+#else
+#define isnan std::isnan
#endif
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl