]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timedelta.cpp
Make to_unixtime const
[libs/core.git] / source / time / timedelta.cpp
index f7b037ea7d154dac0e7b931106fbd2932a1dbbba..d94d8c5f0e7463ad8e454ab214b6b1126206b67a 100644 (file)
@@ -1,8 +1,10 @@
-/*
+/* $Id$
+
 This file is part of libmspcore
 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
+
 #include <sstream>
 #include <iomanip>
 #include "timedelta.h"
@@ -12,9 +14,11 @@ using namespace std;
 
 namespace {
 
-void print_part(ostream &out, int64_t &value, int64_t unit, char sep, bool &first)
+using Msp::Time::RawTime;
+
+void print_part(ostream &out, RawTime &value, RawTime unit, char sep, bool &first)
 {
-       if(!value || (value<unit && first))
+       if(value<unit && first)
                return;
        
        if(!first)
@@ -35,7 +39,7 @@ ostream &operator<<(ostream &out, const TimeDelta &td)
        ostringstream ss;
        ss.fill('0');
 
-       int64_t value=td.raw();
+       RawTime value=td.raw();
 
        if(value<0)
        {