[adevs] fix building tests with the newest g++

Jan Kaluža jkaluza at fedoraproject.org
Tue Jun 18 11:15:22 UTC 2013


commit 228584ac1fdd29bad8f970de2bca5755582f2184
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Tue Jun 18 13:14:43 2013 +0200

    fix building tests with the newest g++

 adevs-2.6-build.patch |   13 +++++++++++++
 adevs.spec            |    5 ++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/adevs-2.6-build.patch b/adevs-2.6-build.patch
index b9e839f..80cba4e 100644
--- a/adevs-2.6-build.patch
+++ b/adevs-2.6-build.patch
@@ -11,6 +11,19 @@ index aa2f442..ed6e53e 100644
  	// Check for a model transition
  	if (model->model_transition() && model->getParent() != NULL)
  	{
+diff --git a/include/adevs_time.h b/include/adevs_time.h
+index 76111ac..061351b 100644
+--- a/include/adevs_time.h
++++ b/include/adevs_time.h
+@@ -47,7 +47,7 @@ template<class T = double> struct Time
+ 	/// Value for infinity
+ 	static adevs::Time<T> Inf() { return Time<T>(adevs_inf<T>(),0); }
+ 	/// Constructor. Default time is (0,0).
+-	Time(T t = 0, unsigned int c = 0):t(t),c(c){}
++	Time(T t = adevs_zero<T>(), unsigned int c = 0):t(t),c(c){}
+ 	/// Copy constructor
+ 	Time(const Time& t2):t(t2.t),c(t2.c){}
+ 	/// Assignment operator
 diff --git a/test/alt_time_tests.cpp b/test/alt_time_tests.cpp
 index 2409adb..0d0e553 100644
 --- a/test/alt_time_tests.cpp
diff --git a/adevs.spec b/adevs.spec
index 5b8a702..a8d3fbd 100644
--- a/adevs.spec
+++ b/adevs.spec
@@ -1,6 +1,6 @@
 Name:           adevs
 Version:        2.6
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        C++ library for constructing discrete event simulation
 Group:          System Environment/Libraries
 License:        LGPLv2+
@@ -97,6 +97,9 @@ rm -r ./examples/java_life
 %doc docs/api docs/manual examples
 
 %changelog
+* Tue Jun 18 2013 Jan Kaluza <jkaluza at redhat.com> - 2.3-4
+- fix building tests with the newest g++
+
 * Mon Jun 17 2013 Jan Kaluza <jkaluza at redhat.com> - 2.6-3
 - rename -docs package to -doc
 


More information about the scm-commits mailing list