From 414a8af1ba3f8514a7bbad1c94375be363d608ea Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Thu, 13 Jun 2019 19:37:27 +0200 Subject: [PATCH] STYLE: use uintptr_t instead of long --- applications/test/Matrix/Test-Matrix.C | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/applications/test/Matrix/Test-Matrix.C b/applications/test/Matrix/Test-Matrix.C index 3ea5fcaaded..1aa50c363b1 100644 --- a/applications/test/Matrix/Test-Matrix.C +++ b/applications/test/Matrix/Test-Matrix.C @@ -30,6 +30,7 @@ License #include "LLTMatrix.H" #include "Random.H" #include "SortList.H" +#include "Switch.H" #include <algorithm> using namespace Foam; @@ -237,22 +238,14 @@ int main(int argc, char *argv[]) Info<< "# SquareMatrix<scalar> example:" << 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 - << "Number of rows =" << tab << mRows << nl - << "Number of columns = " << tab << nCols << nl - << "Number of elements = " << tab << size << nl - << "Number of rows/columns = " << tab << sizes << nl - << "Matrix is empty = " << tab << isEmpty << nl - << "Constant pointer = " << tab << constPointer << nl - << "Pointer = " << tab << pointer << nl + << "Number of rows =" << tab << S.m() << nl + << "Number of columns = " << tab << S.n() << nl + << "Number of elements = " << tab << S.size() << nl + << "Number of rows/columns = " << tab << S.sizes() << nl + << "Matrix is empty = " << tab << Switch(S.empty()) << nl + << "Constant pointer = " << tab << uintptr_t(S.cdata()) << nl + << "Pointer = " << tab << uintptr_t(S.data()) << nl << nl; horizontalLine(); -- GitLab