Ticket #2303: date_time.patch

File date_time.patch, 5.2 KB (added by alexott@…, 14 years ago)

patch to fix warnings

  • boost/date_time/posix_time/posix_time_config.hpp

     
    8282    //Give duration access to ticks constructor -- hide from users
    8383    friend class date_time::time_duration<time_duration, time_res_traits>;
    8484  private:
    85     explicit time_duration(impl_type ticks) :
    86       date_time::time_duration<time_duration, time_res_traits>(ticks)
     85    explicit time_duration(impl_type _ticks) :
     86                date_time::time_duration<time_duration, time_res_traits>(_ticks)
    8787    {}
    8888  };
    8989
  • boost/date_time/posix_time/posix_time_io.hpp

     
    5555      //since we would always need to reconstruct for every time period
    5656      //if the locale did not already exist.  Of course this will be overridden
    5757      //if the user imbues as some later point.
    58       std::ostreambuf_iterator<CharT> oitr(os);
     58      std::ostreambuf_iterator<CharT> oitr_(os);
    5959      custom_ptime_facet* f = new custom_ptime_facet();
    6060      std::locale l = std::locale(os.getloc(), f);
    6161      os.imbue(l);
    62       f->put(oitr, os, os.fill(), p);
     62      f->put(oitr_, os, os.fill(), p);
    6363    }
    6464    return os;
    6565  }
     
    126126      //since we would always need to reconstruct for every time period
    127127      //if the local did not already exist.  Of course this will be overridden
    128128      //if the user imbues as some later point.
    129       std::ostreambuf_iterator<CharT> oitr(os);
     129      std::ostreambuf_iterator<CharT> oitr_(os);
    130130      custom_ptime_facet* f = new custom_ptime_facet();
    131131      std::locale l = std::locale(os.getloc(), f);
    132132      os.imbue(l);
    133       f->put(oitr, os, os.fill(), p);
     133      f->put(oitr_, os, os.fill(), p);
    134134    }
    135135    return os;
    136136  }
     
    194194      //since we would always need to reconstruct for every time period
    195195      //if the locale did not already exist.  Of course this will be overridden
    196196      //if the user imbues as some later point.
    197       std::ostreambuf_iterator<CharT> oitr(os);
     197      std::ostreambuf_iterator<CharT> oitr_(os);
    198198      custom_ptime_facet* f = new custom_ptime_facet();
    199199      std::locale l = std::locale(os.getloc(), f);
    200200      os.imbue(l);
    201       f->put(oitr, os, os.fill(), td);
     201      f->put(oitr_, os, os.fill(), td);
    202202    }
    203203    return os;
    204204  }
  • boost/date_time/period_parser.hpp

     
    5050    enum period_range_option { AS_OPEN_RANGE, AS_CLOSED_RANGE };
    5151
    5252    //! Constructor that sets up period parser options
    53     period_parser(period_range_option range_option = AS_CLOSED_RANGE,
     53    period_parser(period_range_option range_option_ = AS_CLOSED_RANGE,
    5454                  const char_type* const period_separator = default_period_separator,
    5555                  const char_type* const period_start_delimeter = default_period_start_delimeter,
    5656                  const char_type* const period_open_range_end_delimeter = default_period_open_range_end_delimeter,
    5757                  const char_type* const period_closed_range_end_delimeter = default_period_closed_range_end_delimeter)
    58       : m_range_option(range_option)
     58      : m_range_option(range_option_)
    5959    {
    6060      delimiters.push_back(string_type(period_separator));
    6161      delimiters.push_back(string_type(period_start_delimeter));
  • boost/date_time/date_generator_formatter.hpp

     
    7575      }
    7676
    7777      //! Constructor that allows for a custom set of phrase elements
    78       date_generator_formatter(const string_type& first,
    79                                const string_type& second,
    80                                const string_type& third,
    81                                const string_type& fourth,
    82                                const string_type& fifth,
    83                                const string_type& last,
    84                                const string_type& before,
    85                                const string_type& after,
    86                                const string_type& of)
     78      date_generator_formatter(const string_type& first_,
     79                               const string_type& second_,
     80                               const string_type& third_,
     81                               const string_type& fourth_,
     82                               const string_type& fifth_,
     83                               const string_type& last_,
     84                               const string_type& before_,
     85                               const string_type& after_,
     86                               const string_type& of_)
    8787      {
    8888        phrase_strings.push_back(string_type(first_string));
    8989        phrase_strings.push_back(string_type(second_string));