X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Farray2dfile.cpp;h=121f3c862a3bcad3b1940c07ef7303ad168591b4;hb=2debde82a721c0cf5bdf6642ace3290f83bb21a4;hp=6517015e7eca657f563937307fd72fb31cb28c81;hpb=48522ae1223ed1a824ff43bab5aea7d373cf8a7f;p=ctsim.git diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index 6517015..121f3c8 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.10 2000/12/04 03:11:01 kevin Exp $ +** $Id: array2dfile.cpp,v 1.12 2000/12/04 03:42:00 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -27,7 +27,9 @@ #include "array2dfile.h" #include +#ifndef WIN32 #include +#endif using namespace std; @@ -60,7 +62,7 @@ Array2dFileLabel::Array2dFileLabel() init(); } -Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime = 0.) +Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime) : m_strLabel (str) { init(); @@ -69,7 +71,7 @@ Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime = 0.) m_calcTime = ctime; } -Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime = 0.) +Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime) : m_strLabel (str) { init(); @@ -413,11 +415,11 @@ Array2dFile::arrayDataWrite (frnetorderstream& fs) if (NativeBigEndian()) { for (unsigned int iy = 0; iy < m_ny; iy++) { ConvertReverseNetworkOrder (ptrColumn, m_pixelSize); - fs.write (ptrColumn, m_pixelSize); + fs.write (reinterpret_cast(ptrColumn), m_pixelSize); ptrColumn += m_pixelSize; } } else - fs.write (ptrColumn, columnSize); + fs.write (reinterpret_cast(ptrColumn), columnSize); } return true; @@ -441,12 +443,12 @@ Array2dFile::arrayDataRead (frnetorderstream& fs) unsigned char* ptrColumn = m_arrayData[ix]; if (NativeBigEndian()) { for (unsigned int iy = 0; iy < m_ny; iy++) { - fs.read (ptrColumn, m_pixelSize); + fs.read (reinterpret_cast(ptrColumn), m_pixelSize); ConvertReverseNetworkOrder (ptrColumn, m_pixelSize); ptrColumn += m_pixelSize; } } else - fs.read (ptrColumn, columnSize); + fs.read (reinterpret_cast(ptrColumn), columnSize); } return true; @@ -522,14 +524,14 @@ Array2dFile::labelsWrite (frnetorderstream& fs) } void -Array2dFile::labelAdd (const char* const lstr, double calc_time=0.) +Array2dFile::labelAdd (const char* const lstr, double calc_time) { labelAdd (Array2dFileLabel::L_HISTORY, lstr, calc_time); } void -Array2dFile::labelAdd (int type, const char* const lstr, double calc_time=0.) +Array2dFile::labelAdd (int type, const char* const lstr, double calc_time) { Array2dFileLabel label (type, lstr, calc_time);