From e9904990d49499270dfe26a9ae85178a456b30aa Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 18 Mar 2007 13:47:07 +0000 Subject: [PATCH] Fixed a crash. Revision 354's addition of the 'mutable String hex_;' in class Color somehow caused studio to crash when opening any file. This revision makes the new member static instead. git-svn-id: http://svn.voria.com/code@356 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/color.cpp | 6 ++++-- synfig-core/trunk/src/synfig/color.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/synfig-core/trunk/src/synfig/color.cpp b/synfig-core/trunk/src/synfig/color.cpp index 9ef2c03..7df6106 100644 --- a/synfig-core/trunk/src/synfig/color.cpp +++ b/synfig-core/trunk/src/synfig/color.cpp @@ -47,13 +47,15 @@ using namespace std; /* === G L O B A L S ======================================================= */ +String Color::hex_; + /* === P R O C E D U R E S ================================================= */ /* === M E T H O D S ======================================================= */ -static ColorReal +ColorReal Color::hex2real(String s) { std::istringstream i(s); @@ -64,7 +66,7 @@ Color::hex2real(String s) return n / 255.0f; } -static const String +const String Color::real2hex(ColorReal c) { std::ostringstream o; diff --git a/synfig-core/trunk/src/synfig/color.h b/synfig-core/trunk/src/synfig/color.h index 3d501a2..d3ae54d 100644 --- a/synfig-core/trunk/src/synfig/color.h +++ b/synfig-core/trunk/src/synfig/color.h @@ -107,7 +107,7 @@ public: private: value_type a_, r_, g_, b_; - mutable String hex_; + static String hex_; public: -- 2.7.4