STYLE: adjust name, default count for readRawLabel/readRawScalar (#1378)

This commit is contained in:
Mark Olesen 2019-08-06 11:54:14 +02:00 committed by Andrew Heather
parent 7b2931272f
commit c28d785a73
5 changed files with 11 additions and 11 deletions

View File

@ -340,7 +340,7 @@ int main(int argc, char *argv[])
// {
// val = readRawScalar(is);
// }
readRawScalars(is, dstList.data(), dstList.size());
readRawScalar(is, dstList.data(), dstList.size());
is.endRawRead();
Info<< "Wrote " << flatOutput(srcList) << nl

View File

@ -40,12 +40,12 @@ Foam::scalar Foam::readScalar(Istream& is)
Foam::scalar Foam::readRawScalar(Istream& is)
{
scalar val(0);
readRawScalars(is, &val, 1);
readRawScalar(is, &val, 1);
return val;
}
void Foam::readRawScalars(Istream& is, scalar* data, size_t nElem)
void Foam::readRawScalar(Istream& is, scalar* data, size_t nElem)
{
// No check for binary vs ascii, the caller knows what they are doing

View File

@ -92,10 +92,10 @@ namespace Foam
// the caller knows what they are doing
scalar readRawScalar(Istream& is);
//- Read raw scalars from binary stream.
//- Read raw scalar(s) from binary stream.
// \note No internal check for binary vs ascii,
// the caller knows what they are doing
void readRawScalars(Istream& is, scalar* data, size_t nElem);
void readRawScalar(Istream& is, scalar* data, size_t nElem = 1);
}
#elif defined(WM_DP)
@ -144,10 +144,10 @@ namespace Foam
// the caller knows what they are doing
scalar readRawScalar(Istream& is);
//- Read raw scalars from binary stream.
//- Read raw scalar(s) from binary stream.
// \note No internal check for binary vs ascii,
// the caller knows what they are doing
void readRawScalars(Istream& is, scalar* data, size_t nElem);
void readRawScalar(Istream& is, scalar* data, size_t nElem = 1);
}
#endif

View File

@ -45,12 +45,12 @@ const char* const Foam::pTraits<int64_t>::typeName = "label";
Foam::label Foam::readRawLabel(Istream& is)
{
label val(0);
readRawLabels(is, &val, 1);
readRawLabel(is, &val, 1);
return val;
}
void Foam::readRawLabels(Istream& is, label* data, size_t nElem)
void Foam::readRawLabel(Istream& is, label* data, size_t nElem)
{
// No check for binary vs ascii, the caller knows what they are doing

View File

@ -108,10 +108,10 @@ inline label readLabel(Istream& is)
// the caller knows what they are doing
label readRawLabel(Istream& is);
//- Read raw labels from binary stream.
//- Read raw label(s) from binary stream.
// \note No internal check for binary vs ascii,
// the caller knows what they are doing
void readRawLabels(Istream& is, label* data, size_t nElem);
void readRawLabel(Istream& is, label* data, size_t nElem = 1);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //