STYLE: adjust name, default count for readRawLabel/readRawScalar (#1378)
This commit is contained in:
parent
7b2931272f
commit
c28d785a73
@ -340,7 +340,7 @@ int main(int argc, char *argv[])
|
|||||||
// {
|
// {
|
||||||
// val = readRawScalar(is);
|
// val = readRawScalar(is);
|
||||||
// }
|
// }
|
||||||
readRawScalars(is, dstList.data(), dstList.size());
|
readRawScalar(is, dstList.data(), dstList.size());
|
||||||
is.endRawRead();
|
is.endRawRead();
|
||||||
|
|
||||||
Info<< "Wrote " << flatOutput(srcList) << nl
|
Info<< "Wrote " << flatOutput(srcList) << nl
|
||||||
|
@ -40,12 +40,12 @@ Foam::scalar Foam::readScalar(Istream& is)
|
|||||||
Foam::scalar Foam::readRawScalar(Istream& is)
|
Foam::scalar Foam::readRawScalar(Istream& is)
|
||||||
{
|
{
|
||||||
scalar val(0);
|
scalar val(0);
|
||||||
readRawScalars(is, &val, 1);
|
readRawScalar(is, &val, 1);
|
||||||
return val;
|
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
|
// No check for binary vs ascii, the caller knows what they are doing
|
||||||
|
|
||||||
|
@ -92,10 +92,10 @@ namespace Foam
|
|||||||
// the caller knows what they are doing
|
// the caller knows what they are doing
|
||||||
scalar readRawScalar(Istream& is);
|
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,
|
// \note No internal check for binary vs ascii,
|
||||||
// the caller knows what they are doing
|
// 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)
|
#elif defined(WM_DP)
|
||||||
@ -144,10 +144,10 @@ namespace Foam
|
|||||||
// the caller knows what they are doing
|
// the caller knows what they are doing
|
||||||
scalar readRawScalar(Istream& is);
|
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,
|
// \note No internal check for binary vs ascii,
|
||||||
// the caller knows what they are doing
|
// 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
|
#endif
|
||||||
|
@ -45,12 +45,12 @@ const char* const Foam::pTraits<int64_t>::typeName = "label";
|
|||||||
Foam::label Foam::readRawLabel(Istream& is)
|
Foam::label Foam::readRawLabel(Istream& is)
|
||||||
{
|
{
|
||||||
label val(0);
|
label val(0);
|
||||||
readRawLabels(is, &val, 1);
|
readRawLabel(is, &val, 1);
|
||||||
return val;
|
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
|
// No check for binary vs ascii, the caller knows what they are doing
|
||||||
|
|
||||||
|
@ -108,10 +108,10 @@ inline label readLabel(Istream& is)
|
|||||||
// the caller knows what they are doing
|
// the caller knows what they are doing
|
||||||
label readRawLabel(Istream& is);
|
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,
|
// \note No internal check for binary vs ascii,
|
||||||
// the caller knows what they are doing
|
// 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);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
Loading…
Reference in New Issue
Block a user