Commit c9eb587c authored by Alexey Matveichev's avatar Alexey Matveichev

Deprecated register storage class

register storage class is deprecated in C++11 (and AFAIK it is in
general ignored by gcc and clang).
parent 0360f878
......@@ -35,7 +35,11 @@ Foam::Ostream& Foam::operator<<
)
{
os << DL.size() << "(" << endl;
#if defined(__clang__)
for(label i=0;i<DL.size();++i)
#else
for(register label i=0;i<DL.size();++i)
#endif
{
os << width << "(";
for(label j=0;j<width;++j)
......
......@@ -202,7 +202,11 @@ Foam::Istream& Foam::operator>>
if( listDelimiter == token::BEGIN_LIST )
{
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
{
is >> DL[i];
......@@ -223,7 +227,11 @@ Foam::Istream& Foam::operator>>
"reading the single entry"
);
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
{
DL[i] = element;
}
......@@ -306,7 +314,11 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
if( listDelimiter == token::BEGIN_LIST )
{
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
{
is >> this->operator[](origSize);
++origSize;
......@@ -328,7 +340,11 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
"reading the single entry"
);
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
{
this->operator[](origSize) = element;
++origSize;
......
......@@ -78,7 +78,11 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
if( numblock1 < numBlocks_ )
{
#if defined(__clang__)
for(label i=numblock1;i<numBlocks_;++i)
#else
for(register label i=numblock1;i<numBlocks_;++i)
#endif
delete [] dataPtr_[i];
}
else if( numblock1 > numBlocks_ )
......@@ -91,7 +95,11 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
} while( numblock1 > numAllocatedBlocks_ );
T** dataptr1 = new T*[numAllocatedBlocks_];
#if defined(__clang__)
for(label i=0;i<numBlocks_;++i)
#else
for(register label i=0;i<numBlocks_;++i)
#endif
dataptr1[i] = dataPtr_[i];
if( dataPtr_ )
......@@ -99,7 +107,11 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
dataPtr_ = dataptr1;
}
#if defined(__clang__)
for(label i=numBlocks_;i<numblock1;++i)
#else
for(register label i=numBlocks_;i<numblock1;++i)
#endif
dataPtr_[i] = new T[blockSize];
}
......@@ -110,7 +122,11 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
template<class T, Foam::label Offset>
void Foam::LongList<T, Offset>::clearOut()
{
#if defined(__clang__)
for(label i=0;i<numBlocks_;++i)
#else
for(register label i=0;i<numBlocks_;++i)
#endif
delete [] dataPtr_[i];
if( dataPtr_ )
......@@ -281,7 +297,11 @@ inline void Foam::LongList<T, Offset>::appendIfNotIn(const T& e)
template<class T, Foam::label Offset>
inline bool Foam::LongList<T, Offset>::contains(const T& e) const
{
#if defined(__clang__)
for(label i=0;i<nextFree_;++i)
#else
for(register label i=0;i<nextFree_;++i)
#endif
if( (*this)[i] == e )
return true;
......@@ -294,7 +314,11 @@ inline Foam::label Foam::LongList<T, Offset>::containsAtPosition
const T& e
) const
{
#if defined(__clang__)
for(label i=0;i<nextFree_;++i)
#else
for(register label i=0;i<nextFree_;++i)
#endif
if( (*this)[i] == e )
return i;
......@@ -376,7 +400,11 @@ inline T& Foam::LongList<T, Offset>::newElmt(const label i)
template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const T& t)
{
#if defined(__clang__)
for(label i=0;i<nextFree_;++i)
#else
for(register label i=0;i<nextFree_;++i)
#endif
operator[](i) = t;
}
......@@ -384,7 +412,11 @@ template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l)
{
setSize(l.size());
#if defined(__clang__)
for(label i=0;i<l.nextFree_;++i)
#else
for(register label i=0;i<l.nextFree_;++i)
#endif
operator[](i) = l[i];
}
......
......@@ -37,7 +37,11 @@ Foam::Ostream& Foam::operator<<
{
os << DL.size() << nl << token::BEGIN_LIST;
#if defined(__clang__)
for(label i=0;i<DL.size();++i)
#else
for(register label i=0;i<DL.size();++i)
#endif
{
os << nl << DL.sizeOfRow(i) << token::BEGIN_LIST;
for(label j=0;j<DL.sizeOfRow(i);++j)
......
......@@ -518,7 +518,11 @@ inline bool Foam::VRWGraph::contains
return false;
const label size = rows_[rowI].size();
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
if( data_[start+i] == e )
return true;
......@@ -536,7 +540,11 @@ inline Foam::label Foam::VRWGraph::containsAtPosition
return -1;
const label size = rows_[rowI].size();
#if defined(__clang__)
for(label i=0;i<size;++i)
#else
for(register label i=0;i<size;++i)
#endif
if( data_[start+i] == e )
return i;
......
......@@ -37,7 +37,11 @@ Foam::Ostream& Foam::operator<<
{
os << DL.size() << nl << token::BEGIN_LIST;
#if defined(__clang__)
for(label i=0;i<DL.size();++i)
#else
for(register label i=0;i<DL.size();++i)
#endif
{
os << nl << DL[i];
}
......
......@@ -370,7 +370,11 @@ void decomposeFaces::decomposeConcaveInternalFaces
# endif
//- decompose internal faces
#if defined(__clang__)
for(label faceI=0;faceI<nIntFaces;++faceI)
#else
for(register label faceI=0;faceI<nIntFaces;++faceI)
#endif
{
const face& f = faces[faceI];
......
......@@ -187,7 +187,11 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
neiProcNo[npI] = procBoundaries[patchI].neiProcNo();
nFacesInPatch[npI] = 0;
#if defined(__clang__)
for(label faceI=0;faceI<oldNumFacesInPatch;++faceI)
#else
for(register label faceI=0;faceI<oldNumFacesInPatch;++faceI)
#endif
{
if(
!removeFace[oldStart+faceI] &&
......
......@@ -531,7 +531,11 @@ bool surfaceMorpherCells::morphInternalFaces()
//- remove faces which do not exist any more
boolList removeFace(faces.size(), false);
bool removeFaces(false);
#if defined(__clang__)
for(label faceI=0;faceI<nIntFaces;++faceI)
#else
for(register label faceI=0;faceI<nIntFaces;++faceI)
#endif
if( faces[faceI].size() < 3 )
{
removeFace[faceI] = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment