Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Untitled
Tuesday, May 22nd, 2007 at 3:01:13am UTC 

  1. diff -Nur gizmod-3.1/libH/Debug.hpp gizmod-3.1.new/libH/Debug.hpp
  2. --- gizmod-3.1/libH/Debug.hpp   2007-05-18 22:30:15.000000000 +0900
  3. +++ gizmod-3.1.new/libH/Debug.hpp       2007-05-22 11:59:01.882826776 +0900
  4. @@ -78,9 +78,10 @@
  5.         inline friend const Debug&      operator << (const Debug & dbg, const std::string & s);
  6.         inline friend const Debug&      operator << (const Debug & dbg, const char c);
  7.         inline friend const Debug&      operator << (const Debug & dbg, const int d);
  8. +       inline friend const Debug&      operator << (const Debug & dbg, const unsigned int d);
  9.         inline friend const Debug&      operator << (const Debug & dbg, const long l);
  10.         inline friend const Debug&      operator << (const Debug & dbg, const bool b);
  11. -       inline friend const Debug&      operator << (const Debug & dbg, const size_t d);
  12. +       inline friend const Debug&      operator << (const Debug & dbg, const unsigned long l);
  13.         inline friend const Debug&      operator << (const Debug & dbg, const double lf);
  14.         inline friend const Debug&      operator << (const Debug & dbg, std::ostream&(*f)(std::ostream&)); // for endl
  15.  
  16. @@ -184,6 +185,23 @@
  17.  }
  18.  
  19.  /**
  20. + * \brief  Debug insertion operator for uint
  21. + */
  22. +inline const Debug& operator << (const Debug & dbg, const unsigned int d) {
  23. +       if (Debug::testPrint(dbg)) {
  24. +               std::cout << d;
  25. +               if (Debug::mLogToFile) {
  26. +                       Debug::mLogFile.open(Debug::mLogPath.c_str(), std::ios::app);
  27. +                       if (Debug::mLogFile.is_open()) {
  28. +                               Debug::mLogFile << d;
  29. +                               Debug::mLogFile.close();
  30. +                       }
  31. +               }
  32. +       }       
  33. +       return dbg;
  34. +}
  35. +
  36. +/**
  37.   * \brief  Debug insertion operator for long
  38.   */
  39.  inline const Debug& operator << (const Debug & dbg, const long l) {
  40. @@ -218,15 +236,15 @@
  41.  }
  42.  
  43.  /**
  44. - * \brief  Debug insertion operator for size_t
  45. + * \brief  Debug insertion operator for ulong
  46.   */
  47. -inline const Debug& operator << (const Debug & dbg, const size_t i) {
  48. +inline const Debug& operator << (const Debug & dbg, const unsigned long l) {
  49.         if (Debug::testPrint(dbg)) {
  50. -               std::cout << i;
  51. +               std::cout << l;
  52.                 if (Debug::mLogToFile) {
  53.                         Debug::mLogFile.open(Debug::mLogPath.c_str(), std::ios::app);
  54.                         if (Debug::mLogFile.is_open()) {
  55. -                               Debug::mLogFile << i;
  56. +                               Debug::mLogFile << l;
  57.                                 Debug::mLogFile.close();
  58.                         }
  59.                 }

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right