Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-08-13 13:35:15


Author: steven_watanabe
Date: 2008-08-13 13:35:14 EDT (Wed, 13 Aug 2008)
New Revision: 48129
URL: http://svn.boost.org/trac/boost/changeset/48129

Log:
Fix instantiation count printing for msvc, clear warnings for msvc
Text files modified:
   sandbox/tools/profile_templates/src/filter.cpp | 14 ++++++++++----
   1 files changed, 10 insertions(+), 4 deletions(-)

Modified: sandbox/tools/profile_templates/src/filter.cpp
==============================================================================
--- sandbox/tools/profile_templates/src/filter.cpp (original)
+++ sandbox/tools/profile_templates/src/filter.cpp 2008-08-13 13:35:14 EDT (Wed, 13 Aug 2008)
@@ -10,14 +10,20 @@
     bool matched = false;
     int counter = 0;
     while((ch = std::getchar()) != EOF) {
- buffer.push_back(ch);
+ buffer.push_back(static_cast<char>(ch));
         if(ch == '\n') {
             if(matched) {
- for(int i = 0; i < buffer.size(); ++i) {
+ for(std::size_t i = 0; i < buffer.size(); ++i) {
                     std::putchar(buffer[i]);
                 }
- if(++counter % 100 == 0) {
- std::fprintf(stderr, "On Instantiation %d\n", counter);
+ ++counter;
+#ifdef _MSC_VER
+ int instantiations = counter / 2;
+#else
+ int instantiations = counter;
+#endif
+ if(++instantiations % 100 == 0) {
+ std::fprintf(stderr, "On Instantiation %d\n", instantiations);
                 }
             }
             buffer.clear();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk