STYLE: update applications/tests to use SpanStream/CharStream

This commit is contained in:
Mark Olesen
2023-10-04 18:29:16 +02:00
committed by Andrew Heather
parent 3693d61e6c
commit 0fb2c8eb1c
28 changed files with 99 additions and 93 deletions

View File

@ -34,7 +34,6 @@ Description
#include "scalar.H"
#include "FlatOutput.H"
#include "SpanStream.H"
#include "StringStream.H"
#include "NASCore.H"
#include "parsing.H"
#include "Tuple2.H"
@ -443,6 +442,7 @@ int main(int argc, char *argv[])
<< " read " << sizeof(scalar) << nl;
List<otherType> srcList(15);
List<scalar> dstList; // Read back
forAll(srcList, i)
{
@ -452,13 +452,8 @@ int main(int argc, char *argv[])
OCharStream os(IOstreamOption::BINARY);
os << srcList;
DynamicList<char> buf;
os.swap(buf); // Recover written contents
// Read back
List<scalar> dstList;
ISpanStream is(buf, IOstreamOption::BINARY);
// Recover written contents
ICharStream is(os.release(), IOstreamOption::BINARY);
is.setScalarByteSize(sizeof(otherType));
Info<< "Stream scalar-size ("