summaryrefslogtreecommitdiff
path: root/boost/date_time/adjust_functors.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/date_time/adjust_functors.hpp')
-rw-r--r--boost/date_time/adjust_functors.hpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/boost/date_time/adjust_functors.hpp b/boost/date_time/adjust_functors.hpp
index 7911b7971e..ec2a707659 100644
--- a/boost/date_time/adjust_functors.hpp
+++ b/boost/date_time/adjust_functors.hpp
@@ -23,17 +23,12 @@ namespace date_time {
public:
typedef typename date_type::duration_type duration_type;
day_functor(int f) : f_(f) {}
- duration_type get_offset(const date_type& d) const
+ duration_type get_offset(const date_type&) const
{
- // why is 'd' a parameter???
- // fix compiler warnings
- d.year();
return duration_type(f_);
}
- duration_type get_neg_offset(const date_type& d) const
+ duration_type get_neg_offset(const date_type&) const
{
- // fix compiler warnings
- d.year();
return duration_type(-f_);
}
private:
@@ -129,18 +124,13 @@ namespace date_time {
typedef typename date_type::duration_type duration_type;
typedef typename date_type::calendar_type calendar_type;
week_functor(int f) : f_(f) {}
- duration_type get_offset(const date_type& d) const
+ duration_type get_offset(const date_type&) const
{
- // why is 'd' a parameter???
- // fix compiler warnings
- d.year();
- return duration_type(f_*calendar_type::days_in_week());
+ return duration_type(f_*static_cast<int>(calendar_type::days_in_week()));
}
- duration_type get_neg_offset(const date_type& d) const
+ duration_type get_neg_offset(const date_type&) const
{
- // fix compiler warnings
- d.year();
- return duration_type(-f_*calendar_type::days_in_week());
+ return duration_type(-f_*static_cast<int>(calendar_type::days_in_week()));
}
private:
int f_;