mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Removed use of the deprecated "register" keyword
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340.html
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,7 +64,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
|
||||
{
|
||||
if (delimiter == token::BEGIN_LIST)
|
||||
{
|
||||
for (register label i=0; i<s; ++i)
|
||||
for (label i=0; i<s; ++i)
|
||||
{
|
||||
T element;
|
||||
is >> element;
|
||||
@ -76,7 +76,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
|
||||
T element;
|
||||
is >> element;
|
||||
|
||||
for (register label i=0; i<s; ++i)
|
||||
for (label i=0; i<s; ++i)
|
||||
{
|
||||
L.append(element);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,7 +37,7 @@ inline Foam::FixedList<T, Size>::FixedList()
|
||||
template<class T, unsigned Size>
|
||||
inline Foam::FixedList<T, Size>::FixedList(const T v[Size])
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = v[i];
|
||||
}
|
||||
@ -47,7 +47,7 @@ inline Foam::FixedList<T, Size>::FixedList(const T v[Size])
|
||||
template<class T, unsigned Size>
|
||||
inline Foam::FixedList<T, Size>::FixedList(const T& t)
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = t;
|
||||
}
|
||||
@ -59,7 +59,7 @@ inline Foam::FixedList<T, Size>::FixedList(const UList<T>& lst)
|
||||
{
|
||||
checkSize(lst.size());
|
||||
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = lst[i];
|
||||
}
|
||||
@ -71,7 +71,7 @@ inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& lst)
|
||||
{
|
||||
checkSize(lst.size());
|
||||
|
||||
register label i = 0;
|
||||
label i = 0;
|
||||
for
|
||||
(
|
||||
typename SLList<T>::const_iterator iter = lst.begin();
|
||||
@ -87,7 +87,7 @@ inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& lst)
|
||||
template<class T, unsigned Size>
|
||||
inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& lst)
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = lst[i];
|
||||
}
|
||||
@ -184,7 +184,7 @@ inline void Foam::FixedList<T, Size>::setSize(const label s)
|
||||
template<class T, unsigned Size>
|
||||
inline void Foam::FixedList<T, Size>::transfer(const FixedList<T, Size>& lst)
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = lst[i];
|
||||
}
|
||||
@ -262,7 +262,7 @@ inline const T& Foam::FixedList<T, Size>::operator[](const label i) const
|
||||
template<class T, unsigned Size>
|
||||
inline void Foam::FixedList<T, Size>::operator=(const T lst[Size])
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = lst[i];
|
||||
}
|
||||
@ -273,7 +273,7 @@ inline void Foam::FixedList<T, Size>::operator=(const UList<T>& lst)
|
||||
{
|
||||
checkSize(lst.size());
|
||||
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = lst[i];
|
||||
}
|
||||
@ -284,7 +284,7 @@ inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& lst)
|
||||
{
|
||||
checkSize(lst.size());
|
||||
|
||||
register label i = 0;
|
||||
label i = 0;
|
||||
for
|
||||
(
|
||||
typename SLList<T>::const_iterator iter = lst.begin();
|
||||
@ -299,7 +299,7 @@ inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& lst)
|
||||
template<class T, unsigned Size>
|
||||
inline void Foam::FixedList<T, Size>::operator=(const T& t)
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
v_[i] = t;
|
||||
}
|
||||
@ -443,7 +443,7 @@ inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
|
||||
// hash incrementally
|
||||
unsigned val = seed;
|
||||
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
val = HashT()(lst[i], val);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,7 +85,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
|
||||
|
||||
if (delimiter == token::BEGIN_LIST)
|
||||
{
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
is >> L[i];
|
||||
|
||||
@ -107,7 +107,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
|
||||
"reading the single entry"
|
||||
);
|
||||
|
||||
for (register unsigned i=0; i<Size; i++)
|
||||
for (unsigned i=0; i<Size; i++)
|
||||
{
|
||||
L[i] = element;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -332,7 +332,7 @@ void Foam::List<T>::setSize(const label newSize)
|
||||
|
||||
if (this->size_)
|
||||
{
|
||||
register label i = min(this->size_, newSize);
|
||||
label i = min(this->size_, newSize);
|
||||
|
||||
# ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
@ -342,8 +342,8 @@ void Foam::List<T>::setSize(const label newSize)
|
||||
else
|
||||
# endif
|
||||
{
|
||||
register T* vv = &this->v_[i];
|
||||
register T* av = &nv[i];
|
||||
T* vv = &this->v_[i];
|
||||
T* av = &nv[i];
|
||||
while (i--) *--av = *--vv;
|
||||
}
|
||||
}
|
||||
@ -368,8 +368,8 @@ void Foam::List<T>::setSize(const label newSize, const T& a)
|
||||
|
||||
if (newSize > oldSize)
|
||||
{
|
||||
register label i = newSize - oldSize;
|
||||
register T* vv = &this->v_[newSize];
|
||||
label i = newSize - oldSize;
|
||||
T* vv = &this->v_[newSize];
|
||||
while (i--) *--vv = a;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,7 +81,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
|
||||
{
|
||||
if (delimiter == token::BEGIN_LIST)
|
||||
{
|
||||
for (register label i=0; i<s; i++)
|
||||
for (label i=0; i<s; i++)
|
||||
{
|
||||
is >> L[i];
|
||||
|
||||
@ -102,7 +102,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
|
||||
"reading the single entry"
|
||||
);
|
||||
|
||||
for (register label i=0; i<s; i++)
|
||||
for (label i=0; i<s; i++)
|
||||
{
|
||||
L[i] = element;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,8 +37,8 @@ Description
|
||||
// Element access looping using [] for vector machines
|
||||
|
||||
#define List_FOR_ALL(f, i) \
|
||||
register const label _n##i = (f).size();\
|
||||
for (register label i=0; i<_n##i; i++) \
|
||||
const label _n##i = (f).size();\
|
||||
for (label i=0; i<_n##i; i++) \
|
||||
{
|
||||
|
||||
#define List_END_FOR_ALL }
|
||||
@ -56,7 +56,7 @@ Description
|
||||
// Pointer looping for scalar machines
|
||||
|
||||
#define List_FOR_ALL(f, i) \
|
||||
register label i = (f).size(); \
|
||||
label i = (f).size(); \
|
||||
while (i--) \
|
||||
{ \
|
||||
|
||||
@ -65,10 +65,10 @@ Description
|
||||
#define List_ELEM(f, fp, i) (*fp++)
|
||||
|
||||
#define List_ACCESS(type, f, fp) \
|
||||
register type* __restrict__ fp = (f).begin()
|
||||
type* __restrict__ fp = (f).begin()
|
||||
|
||||
#define List_CONST_ACCESS(type, f, fp) \
|
||||
register const type* __restrict__ fp = (f).begin()
|
||||
const type* __restrict__ fp = (f).begin()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,14 +54,14 @@ License
|
||||
template<unsigned nBits>
|
||||
unsigned int Foam::PackedList<nBits>::count() const
|
||||
{
|
||||
register unsigned int c = 0;
|
||||
unsigned int c = 0;
|
||||
|
||||
if (size_)
|
||||
{
|
||||
const label packLen = packedLength();
|
||||
for (label i = 0; i < packLen; ++i)
|
||||
{
|
||||
register unsigned int bits = StorageList::operator[](i);
|
||||
unsigned int bits = StorageList::operator[](i);
|
||||
COUNT_PACKEDBITS(c, bits);
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
|
||||
{
|
||||
if (delimiter == token::BEGIN_LIST)
|
||||
{
|
||||
for (register label i=0; i<sz; ++i)
|
||||
for (label i=0; i<sz; ++i)
|
||||
{
|
||||
lst[i] = lst.readValue(is);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -157,7 +157,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
|
||||
}
|
||||
else if (newSize < oldSize)
|
||||
{
|
||||
register label i;
|
||||
label i;
|
||||
for (i=newSize; i<oldSize; i++)
|
||||
{
|
||||
if (ptrs_[i])
|
||||
@ -172,7 +172,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
|
||||
{
|
||||
ptrs_.setSize(newSize);
|
||||
|
||||
register label i;
|
||||
label i;
|
||||
for (i=oldSize; i<newSize; i++)
|
||||
{
|
||||
ptrs_[i] = NULL;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -167,7 +167,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
|
||||
<< " expected " << L.size()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
for (register label i=0; i<s; i++)
|
||||
for (label i=0; i<s; i++)
|
||||
{
|
||||
L[i] = elems[i];
|
||||
}
|
||||
@ -196,7 +196,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
|
||||
{
|
||||
if (delimiter == token::BEGIN_LIST)
|
||||
{
|
||||
for (register label i=0; i<s; i++)
|
||||
for (label i=0; i<s; i++)
|
||||
{
|
||||
is >> L[i];
|
||||
|
||||
@ -217,7 +217,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
|
||||
"reading the single entry"
|
||||
);
|
||||
|
||||
for (register label i=0; i<s; i++)
|
||||
for (label i=0; i<s; i++)
|
||||
{
|
||||
L[i] = element;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ void Foam::UPtrList<T>::setSize(const label newSize)
|
||||
ptrs_.setSize(newSize);
|
||||
|
||||
// set new elements to NULL
|
||||
for (register label i=oldSize; i<newSize; i++)
|
||||
for (label i=oldSize; i<newSize; i++)
|
||||
{
|
||||
ptrs_[i] = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user