stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r493207 - /incubator/stdcxx/trunk/include/valarray
Date Fri, 05 Jan 2007 22:06:16 GMT
Author: sebor
Date: Fri Jan  5 14:06:15 2007
New Revision: 493207

URL: http://svn.apache.org/viewvc?view=rev&rev=493207
Log:
2007-01-05  Martin Sebor  <sebor@roguewave.com>

	STDCXX-315
	* valarray (abs, acos, asin, atan, atan2, cos, cosh, exp, log,
	log10, pow, sin, sinh, sqrt, tan, tanh): Initialized destination
	array prior to assigning to its elements. 

Modified:
    incubator/stdcxx/trunk/include/valarray

Modified: incubator/stdcxx/trunk/include/valarray
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/valarray?view=diff&rev=493207&r1=493206&r2=493207
==============================================================================
--- incubator/stdcxx/trunk/include/valarray (original)
+++ incubator/stdcxx/trunk/include/valarray Fri Jan  5 14:06:15 2007
@@ -1027,7 +1027,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> abs (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = __val [__i] < _TypeT () ? -__val [__i] : __val [__i];
@@ -1038,7 +1038,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> acos (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::acos (__val [__i]);
@@ -1049,7 +1049,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> asin (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::asin (__val [__i]);
@@ -1061,7 +1061,7 @@
 template<class _TypeT>
 valarray<_TypeT> atan (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan (__val [__i]);
@@ -1072,7 +1072,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> cos (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::cos (__val [__i]);
@@ -1083,7 +1083,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> cosh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::cosh (__val [__i]);
@@ -1094,7 +1094,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> exp (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::exp (__val [__i]);
@@ -1105,7 +1105,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> log (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::log (__val [__i]);
@@ -1116,7 +1116,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> log10 (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::log10 (__val [__i]);
@@ -1127,7 +1127,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sinh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sinh (__val [__i]);
@@ -1138,7 +1138,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sin (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sin (__val [__i]);
@@ -1149,7 +1149,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> sqrt (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::sqrt (__val [__i]);
@@ -1160,7 +1160,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> tan (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::tan (__val [__i]);
@@ -1171,7 +1171,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> tanh (const valarray<_TypeT> &__val)
 {
-    _RW::__rw_array<_TypeT> __tmp (__val.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __val.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __val.size (); ++__i)
         __tmp [__i] = _RWSTD_C::tanh (__val [__i]);
@@ -1185,7 +1185,7 @@
 {
     _RWSTD_ASSERT (__x.size () == __y.size ());
 
-    _RW::__rw_array<_TypeT> __tmp (__x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y [__i]);
@@ -1221,7 +1221,7 @@
 {
     _RWSTD_ASSERT (__x.size () == __y.size ());
 
-    _RW::__rw_array<_TypeT> __tmp (__x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x [__i], __y [__i]);
@@ -1232,7 +1232,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> pow (const valarray<_TypeT> &__x, const _TypeT &__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (__x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x [__i], __y);
@@ -1243,7 +1243,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> pow (const _TypeT &__x, const valarray<_TypeT> &__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (__y.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (), __y.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::pow (__x, __y [__i]);



Mime
View raw message