STYLE: use uintptr_t instead of long

This commit is contained in:
Mark Olesen
2019-06-13 19:37:27 +02:00
committed by Andrew Heather
parent 4e0222f887
commit f863925112

View File

@ -30,6 +30,7 @@ License
#include "LLTMatrix.H" #include "LLTMatrix.H"
#include "Random.H" #include "Random.H"
#include "SortList.H" #include "SortList.H"
#include "Switch.H"
#include <algorithm> #include <algorithm>
using namespace Foam; using namespace Foam;
@ -237,22 +238,14 @@ int main(int argc, char *argv[])
Info<< "# SquareMatrix<scalar> example:" << nl; Info<< "# SquareMatrix<scalar> example:" << nl;
printMatrix(Info, S) << nl; printMatrix(Info, S) << nl;
const label mRows = S.m();
const label nCols = S.n();
const label size = S.size();
const labelPair sizes = S.sizes();
const bool isEmpty = S.empty();
const long constPointer = long(S.cdata());
long pointer = long(S.data());
Info Info
<< "Number of rows =" << tab << mRows << nl << "Number of rows =" << tab << S.m() << nl
<< "Number of columns = " << tab << nCols << nl << "Number of columns = " << tab << S.n() << nl
<< "Number of elements = " << tab << size << nl << "Number of elements = " << tab << S.size() << nl
<< "Number of rows/columns = " << tab << sizes << nl << "Number of rows/columns = " << tab << S.sizes() << nl
<< "Matrix is empty = " << tab << isEmpty << nl << "Matrix is empty = " << tab << Switch(S.empty()) << nl
<< "Constant pointer = " << tab << constPointer << nl << "Constant pointer = " << tab << uintptr_t(S.cdata()) << nl
<< "Pointer = " << tab << pointer << nl << "Pointer = " << tab << uintptr_t(S.data()) << nl
<< nl; << nl;
horizontalLine(); horizontalLine();