stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r579408 - /incubator/stdcxx/trunk/include/valarray
Date Tue, 25 Sep 2007 22:57:11 GMT
Author: sebor
Date: Tue Sep 25 15:57:11 2007
New Revision: 579408

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

	STDCXX-315
	* valarray (atan2): Initialized array elements before assigning
	to them.

Modified:
    incubator/stdcxx/trunk/include/valarray

Modified: incubator/stdcxx/trunk/include/valarray
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/valarray?rev=579408&r1=579407&r2=579408&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/valarray (original)
+++ incubator/stdcxx/trunk/include/valarray Tue Sep 25 15:57:11 2007
@@ -1196,7 +1196,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> atan2 (const valarray<_TypeT> &__x, const _TypeT
&__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (__x.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __x.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y);
@@ -1207,7 +1207,7 @@
 template<class _TypeT>
 inline valarray<_TypeT> atan2 (const _TypeT &__x, const valarray<_TypeT>
&__y)
 {
-    _RW::__rw_array<_TypeT> __tmp (__y.size ());
+    _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __y.size ());
 
     for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
         __tmp [__i] = _RWSTD_C::atan2 (__x, __y [__i]);



Mime
View raw message