Author: sebor Date: Tue Aug 19 21:00:24 2008 New Revision: 687233 URL: http://svn.apache.org/viewvc?rev=687233&view=rev Log: 2008-08-19 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-1007 * examples/tutorial/radix.cpp: Replaced vestigial occurrences of the std::cout manipulator with '\n' to silence HP aCC 6.16 warning #4320-D: performance advice: std::endl is expensive because it flushes the stream. * examples/tutorial/sieve.cpp: Ditto. * examples/tutorial/spell.cpp: Ditto. * examples/manual/includes.cpp: Ditto. * examples/manual/permutation.cpp: Ditto. * examples/manual/replace.cpp: Ditto. * examples/manual/remove.cpp: Ditto. * examples/manual/adj_diff.cpp: Ditto. * examples/manual/advance.cpp: Ditto. * examples/manual/istringstream.cpp: Ditto. Modified: stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp stdcxx/branches/4.2.x/examples/manual/advance.cpp stdcxx/branches/4.2.x/examples/manual/includes.cpp stdcxx/branches/4.2.x/examples/manual/istringstream.cpp stdcxx/branches/4.2.x/examples/manual/permutation.cpp stdcxx/branches/4.2.x/examples/manual/remove.cpp stdcxx/branches/4.2.x/examples/manual/replace.cpp stdcxx/branches/4.2.x/examples/tutorial/radix.cpp stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp stdcxx/branches/4.2.x/examples/tutorial/spell.cpp Modified: stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp Tue Aug 19 21:00:24 2008 @@ -69,13 +69,13 @@ std::cout << "For the vector: " << '\n' << " "; std::copy (v.begin (), v.end (), osit); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; std::cout << "The differences between adjacent elements are: " << '\n' << " "; std::copy (diffs.begin (), diffs.end (), osit); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; std::cout << "The products of adjacent elements are: " << '\n' << " "; Modified: stdcxx/branches/4.2.x/examples/manual/advance.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/advance.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/advance.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/advance.cpp Tue Aug 19 21:00:24 2008 @@ -51,7 +51,7 @@ std::cout << "For the list: "; std::copy (l.begin (), l.end (), os_iter (std::cout, " ")); - std::cout << '\n' << std::endl + std::cout << "\n\n" << "When the iterator is initialized to l.begin ()," << "\nit points to " << *itr << '\n'; Modified: stdcxx/branches/4.2.x/examples/manual/includes.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/includes.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/includes.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/includes.cpp Tue Aug 19 21:00:24 2008 @@ -68,7 +68,7 @@ std::copy (even.begin (), even.end (), os_iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; return 0; } Modified: stdcxx/branches/4.2.x/examples/manual/istringstream.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/istringstream.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/istringstream.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/istringstream.cpp Tue Aug 19 21:00:24 2008 @@ -131,7 +131,7 @@ in >> a >> b >> d; // output 3 times 10 - std::wcout << a << '\n' << b << std::endl << d << std::endl; + std::wcout << a << '\n' << b << '\n' << d << '\n'; } catch (std::ios::failure &e) { Modified: stdcxx/branches/4.2.x/examples/manual/permutation.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/permutation.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/permutation.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/permutation.cpp Tue Aug 19 21:00:24 2008 @@ -95,7 +95,7 @@ std::cout << "\n Next Permutation: "; std::copy (next_m2.begin (), next_m2.end (), CharOSIter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; return 0; } Modified: stdcxx/branches/4.2.x/examples/manual/remove.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/remove.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/remove.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/remove.cpp Tue Aug 19 21:00:24 2008 @@ -66,7 +66,7 @@ // Write out the contents to cout. std::copy (v.begin (), v.end (), Iter (std::cout," ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Move the 7 to the end of the vector. Vector::iterator result = std::remove (v.begin (), v.end (), 7); @@ -75,18 +75,18 @@ v.erase (result, v.end ()); std::copy (v.begin (), v.end (), Iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Remove all non-zero elements beyond the fourth element. v.erase (std::remove_if (v.begin () + 4, v.end (), bnd_greater( int_greater (), 0 )), v.end ()); std::copy (v.begin (), v.end (), Iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Now remove all 3s on output. std::remove_copy (v.begin (), v.end (), Iter (std::cout, " "), 3); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Now remove everything satisfying predicate on output. std::remove_copy_if (v.begin (), v.end (), Iter (std::cout, " "), Modified: stdcxx/branches/4.2.x/examples/manual/replace.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/replace.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/manual/replace.cpp (original) +++ stdcxx/branches/4.2.x/examples/manual/replace.cpp Tue Aug 19 21:00:24 2008 @@ -58,7 +58,7 @@ // Print out original vector. std::cout << "Original sequence:\n "; std::copy (v.begin (), v.end (), Iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Replace one number with another. std::replace (v.begin (), v.end (), 11199, 11211); @@ -66,7 +66,7 @@ // Print out the new vector. std::cout << "Sequence after replace:\n "; std::copy (v.begin (), v.end (), Iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Replace all numbers that aren't primes with zeros. std::replace_if (v.begin (), v.end (), std::not1 (is_prime ()), 0); @@ -74,12 +74,12 @@ // Print out the remaining vector. std::cout << "After replace_if:\n "; std::copy (v.begin (), v.end (), Iter (std::cout, " ")); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // Replace zeros with ones. std::cout << "Sequence replace_copy-ed to cout:\n "; std::replace_copy (v.begin (), v.end (), Iter (std::cout, " "), 0, 1); - std::cout << '\n' << std::endl; + std::cout << "\n\n"; // A simple example of replace_copy_if. std::cout << "Sequence replace_copy_if-ed to cout:\n "; Modified: stdcxx/branches/4.2.x/examples/tutorial/radix.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/radix.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/tutorial/radix.cpp (original) +++ stdcxx/branches/4.2.x/examples/tutorial/radix.cpp Tue Aug 19 21:00:24 2008 @@ -100,7 +100,7 @@ radixSort (values); std::copy (values.begin (), values.end (), OstreamIter (std::cout, " ")); - std::cout << '\n' << "End radix sort program" << std::endl; + std::cout << '\n' << "End radix sort program" << '\n'; return 0; } Modified: stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp (original) +++ stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp Tue Aug 19 21:00:24 2008 @@ -51,7 +51,7 @@ if (sieve[j]) std::cout << j << " "; - std::cout << '\n' << "End of Prime Sieve program" << std::endl; + std::cout << '\n' << "End of Prime Sieve program" << '\n'; return 0; } Modified: stdcxx/branches/4.2.x/examples/tutorial/spell.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/spell.cpp?rev=687233&r1=687232&r2=687233&view=diff ============================================================================== --- stdcxx/branches/4.2.x/examples/tutorial/spell.cpp (original) +++ stdcxx/branches/4.2.x/examples/tutorial/spell.cpp Tue Aug 19 21:00:24 2008 @@ -62,7 +62,7 @@ misspellings.insert (word); // Finally, output all misspellings. - std::cout << '\n' << "Misspelled words:" << std::endl; + std::cout << '\n' << "Misspelled words:" << '\n'; std::copy (misspellings.begin (), misspellings.end (), ostrm_iter (std::cout, "\n"));