Commit f58df8aa authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

use precisely the same variable type for binary input and output of

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
TAbsoluteTime


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4502
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 7fefb192
......@@ -30,11 +30,13 @@
*
* REVISIONS and CHANGES
* - 10/11/2011 V1.0 Thomas Forbriger
* - 31/01/2012 V1.1 use precisely the same variable type for
* TAbsoluteTime input and output
*
* ============================================================================
*/
#define DATRW_IBINSTREAM_CC_VERSION \
"DATRW_IBINSTREAM_CC V1.0 "
"DATRW_IBINSTREAM_CC V1.1"
#define DATRW_IBINSTREAM_CC_CVSID \
"$Id$"
......@@ -130,7 +132,7 @@ namespace datrw {
void ibinstream::read(libtime::TAbsoluteTime& v)
{
libtime::timeint year;
unsigned int year;
char month, day, hour, minute, second;
short milsec, micsec;
this->read(year);
......
......@@ -30,11 +30,13 @@
*
* REVISIONS and CHANGES
* - 10/11/2011 V1.0 Thomas Forbriger
* - 31/01/2012 V1.1 use precisely the same variable type for
* TAbsoluteTime input and output
*
* ============================================================================
*/
#define DATRW_OBINSTREAM_CC_VERSION \
"DATRW_OBINSTREAM_CC V1.0 "
"DATRW_OBINSTREAM_CC V1.1"
#define DATRW_OBINSTREAM_CC_CVSID \
"$Id$"
......@@ -109,14 +111,14 @@ namespace datrw {
void obinstream::write(const libtime::TAbsoluteTime& v)
{
this->write(v.year());
this->write(char(v.month()));
this->write(char(v.day()));
this->write(char(v.hour()));
this->write(char(v.minute()));
this->write(char(v.second()));
this->write(short(v.milsec()));
this->write(short(v.micsec()));
this->write(static_cast<unsigned int>(v.year()));
this->write(static_cast<char>(v.month()));
this->write(static_cast<char>(v.day()));
this->write(static_cast<char>(v.hour()));
this->write(static_cast<char>(v.minute()));
this->write(static_cast<char>(v.second()));
this->write(static_cast<short>(v.milsec()));
this->write(static_cast<short>(v.micsec()));
} // void obinstream::write(const libtime::TAbsoluteTime& v)
/*----------------------------------------------------------------------*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment