mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use uintptr_t cast instead of long when reporting addresses
This commit is contained in:
committed by
Andrew Heather
parent
4a1208ed30
commit
59da4cf56d
@ -75,8 +75,8 @@ void printTuple2(const Tuple2<word, word>& t)
|
||||
{
|
||||
Info<< "tuple: " << t << nl;
|
||||
|
||||
Info<< "first @: " << long(t.first().data()) << nl;
|
||||
Info<< "second @: " << long(t.second().data()) << nl;
|
||||
Info<< "first @: " << uintptr_t(t.first().data()) << nl;
|
||||
Info<< "second @: " << uintptr_t(t.second().data()) << nl;
|
||||
}
|
||||
|
||||
|
||||
@ -85,8 +85,8 @@ void printTuple2(const Pair<word>& t)
|
||||
{
|
||||
Info<< "tuple: " << t << nl;
|
||||
|
||||
Info<< "first @: " << long(t.first().data()) << nl;
|
||||
Info<< "second @: " << long(t.second().data()) << nl;
|
||||
Info<< "first @: " << uintptr_t(t.first().data()) << nl;
|
||||
Info<< "second @: " << uintptr_t(t.second().data()) << nl;
|
||||
}
|
||||
|
||||
|
||||
@ -191,30 +191,30 @@ int main()
|
||||
word word1("hello");
|
||||
word word2("word");
|
||||
|
||||
Info<< "create with " << word1 << " @ " << long(word1.data())
|
||||
<< " " << word2 << " @ " << long(word2.data()) << nl;
|
||||
Info<< "create with " << word1 << " @ " << uintptr_t(word1.data())
|
||||
<< " " << word2 << " @ " << uintptr_t(word2.data()) << nl;
|
||||
|
||||
Tuple2<word, word> tup(std::move(word2), std::move(word1));
|
||||
|
||||
printTuple2(tup);
|
||||
|
||||
Info<< "input is now " << word1 << " @ " << long(word1.data())
|
||||
<< " " << word2 << " @ " << long(word2.data()) << nl;
|
||||
Info<< "input is now " << word1 << " @ " << uintptr_t(word1.data())
|
||||
<< " " << word2 << " @ " << uintptr_t(word2.data()) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
word word1("hello");
|
||||
word word2("word");
|
||||
|
||||
Info<< "create with " << word1 << " @ " << long(word1.data())
|
||||
<< " " << word2 << " @ " << long(word2.data()) << nl;
|
||||
Info<< "create with " << word1 << " @ " << uintptr_t(word1.data())
|
||||
<< " " << word2 << " @ " << uintptr_t(word2.data()) << nl;
|
||||
|
||||
Pair<word> tup(std::move(word2), std::move(word1));
|
||||
|
||||
printTuple2(tup);
|
||||
|
||||
Info<< "input is now " << word1 << " @ " << long(word1.data())
|
||||
<< " " << word2 << " @ " << long(word2.data()) << nl;
|
||||
Info<< "input is now " << word1 << " @ " << uintptr_t(word1.data())
|
||||
<< " " << word2 << " @ " << uintptr_t(word2.data()) << nl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user