stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r636370 - in /stdcxx/branches/4.2.x/examples: include/stocks.h manual/money_manip.cpp tutorial/alg7.cpp tutorial/stocks.cpp
Date Wed, 12 Mar 2008 15:32:59 GMT
Author: faridz
Date: Wed Mar 12 08:32:56 2008
New Revision: 636370

URL: http://svn.apache.org/viewvc?rev=636370&view=rev
Log:
2008-03-12 Farid Zaripov <farid_zaripov@epam.com>

	Merged r634731 from trunk.
	
	2008-01-18  Travis Vitek  <vitek@roguewave.com>

	* examples/include/stocks.h: Change class name from
	FrankFurtStockXchange to FrankfurtStockXchange for
	correctness.
	* examples/tutorial/stocks.cpp (main): Ditto.


	2008-01-18  Travis Vitek  <vitek@roguewave.com>

	* examples/include/stocks.h [AIX, __osf__]: Update locale names
	so that example produces useful output.


	2008-02-13  Martin Sebor  <sebor@roguewave.com>

	* examples/tutoria/alg7.cpp (partial_sort_example): Removed redundant
	list ctor argument to get around an otherwise hard to silence HP aCC
	6 remark #4271-D type conversion may lose sign. See STDCXX-727.
	(merge_example): Ditto


	2008-02-14  Farid Zaripov  <farid_zaripov@epam.com>

	* examples/manual/money_manip.cpp (put_money): Change the parameter type
	from long double to const long double& to prevent assigning the reference
	to the temporary value which is deleted when reference is used..

Modified:
    stdcxx/branches/4.2.x/examples/include/stocks.h
    stdcxx/branches/4.2.x/examples/manual/money_manip.cpp
    stdcxx/branches/4.2.x/examples/tutorial/alg7.cpp
    stdcxx/branches/4.2.x/examples/tutorial/stocks.cpp

Modified: stdcxx/branches/4.2.x/examples/include/stocks.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/include/stocks.h?rev=636370&r1=636369&r2=636370&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/include/stocks.h (original)
+++ stdcxx/branches/4.2.x/examples/include/stocks.h Wed Mar 12 08:32:56 2008
@@ -49,9 +49,9 @@
 
 #if defined (_AIX)
 #  define US_LOCALE             "en_US"
-#  define GERMAN_LOCALE         "De_DE.IBM-850"
-#  define FRENCH_LOCALE         "Fr_FR.IBM-850"
-#  define JAPANESE_LOCALE       "Ja_JP.IBM-932"
+#  define GERMAN_LOCALE         "de_DE"
+#  define FRENCH_LOCALE         "fr_FR"
+#  define JAPANESE_LOCALE       "ja_JP"
 #elif defined (__hpux)
 #  define US_LOCALE             "en_US.iso88591"
 #  define GERMAN_LOCALE         "de_DE.iso88591"
@@ -63,10 +63,10 @@
 #  define FRENCH_LOCALE         "fr_FR"
 #  define JAPANESE_LOCALE       "ja_JP"
 #elif defined (__osf__)
-#  define US_LOCALE             "en_US"
-#  define GERMAN_LOCALE         "de_DE.88591"
-#  define FRENCH_LOCALE         "fr_FR.88591"
-#  define JAPANESE_LOCALE       "ja_JA.88591"
+#  define US_LOCALE             "en_US.ISO8859-1"
+#  define GERMAN_LOCALE         "de_DE.ISO8859-1"
+#  define FRENCH_LOCALE         "fr_FR.ISO8859-1"
+#  define JAPANESE_LOCALE       "ja_JP"
 #elif defined (SNI)
 #  define US_LOCALE             "En"
 #  define GERMAN_LOCALE         "De"
@@ -192,9 +192,9 @@
 }; 
 
 
-struct FrankFurtStockXchange: public StockXchange
+struct FrankfurtStockXchange: public StockXchange
 {
-    FrankFurtStockXchange (std::size_t refs = 0)
+    FrankfurtStockXchange (std::size_t refs = 0)
         : StockXchange (refs) { }
 
     virtual void localTime(std::ostream& os) const {

Modified: stdcxx/branches/4.2.x/examples/manual/money_manip.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/money_manip.cpp?rev=636370&r1=636369&r2=636370&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/money_manip.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/money_manip.cpp Wed Mar 12 08:32:56 2008
@@ -121,7 +121,7 @@
 
 // manipulator for the insertion of monetary long double values
 inline std::__rw_smanip<money_put_manip<long double>, bool>
-put_money (long double val, bool intl = false)
+put_money (const long double &val, bool intl = false)
 {
     // return an object of the manipulator implementation type
     // that will store the function arguments until its function

Modified: stdcxx/branches/4.2.x/examples/tutorial/alg7.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/alg7.cpp?rev=636370&r1=636369&r2=636370&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/alg7.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/alg7.cpp Wed Mar 12 08:32:56 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -109,7 +109,7 @@
     std::cout << '\n';
 
     // Make a std::list of random integers.
-    std::list<int, std::allocator<int> > aList (15, 0);
+    std::list<int, std::allocator<int> > aList (15);
     std::generate (aList.begin (), aList.end (), randomValue);
     std::copy (aList.begin (), aList.end (), intOut);
     std::cout << '\n';
@@ -179,7 +179,7 @@
 
     // Make a std::list and std::vector of 10 random integers.
     std::vector<int, std::allocator<int> > aVec (10);
-    std::list<int, std::allocator<int> > aList (10, 0);
+    std::list<int, std::allocator<int> > aList (10);
     std::generate (aVec.begin (), aVec.end (), randomValue);
     std::sort (aVec.begin (), aVec.end ());
     std::generate_n (aList.begin (), 10, randomValue);

Modified: stdcxx/branches/4.2.x/examples/tutorial/stocks.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/stocks.cpp?rev=636370&r1=636369&r2=636370&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/stocks.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/stocks.cpp Wed Mar 12 08:32:56 2008
@@ -150,7 +150,7 @@
     if (!p)
         std::cerr<< "\nNot a valid locale: " << GERMAN_LOCALE << '\n';
     else {
-        FrankFurtStockXchange *fse = new FrankFurtStockXchange;   
+        FrankfurtStockXchange *fse = new FrankfurtStockXchange;   
         fse->add ("B\166rsen-Software", 9.75);
         fse->add ("M\174nchner R\174ck", 19.75);
     



Mime
View raw message