Fix build breakage for gcc 4.7+ and LLVM/clang
This commit is contained in:
parent
8052abb3df
commit
1d4ebe8ac2
|
@ -883,11 +883,10 @@ void cLockedTemporaryFileArchive::OpenReadWrite( const TCHAR* filename, uint32 o
|
||||||
strTempFile += _T("twtempXXXXXX");
|
strTempFile += _T("twtempXXXXXX");
|
||||||
iFSServices::GetInstance()->MakeTempFilename( strTempFile );
|
iFSServices::GetInstance()->MakeTempFilename( strTempFile );
|
||||||
}
|
}
|
||||||
catch( eFSServices& e)
|
catch( eFSServices& fileError)
|
||||||
{
|
{
|
||||||
TSTRING errStr = TSS_GetString( cCore, core::STR_BAD_TEMPDIRECTORY );
|
TSTRING errStr = TSS_GetString( cCore, core::STR_BAD_TEMPDIRECTORY );
|
||||||
eArchiveOpen e(strTempFile, errStr);
|
throw eArchiveOpen(strTempFile, errStr);
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -817,8 +817,9 @@ void cEncoder::ValidateSchema() const
|
||||||
bool cEncoder::OnlyOneCatagoryPerChar() const
|
bool cEncoder::OnlyOneCatagoryPerChar() const
|
||||||
{
|
{
|
||||||
// TODO:BAM - man, is there a better way to do this?
|
// TODO:BAM - man, is there a better way to do this?
|
||||||
TCHAR ach[2] = {0};
|
|
||||||
TCHAR ch = std::numeric_limits<TCHAR>::min();
|
TCHAR ch = std::numeric_limits<TCHAR>::min();
|
||||||
|
TSTRING ach(1,ch);
|
||||||
|
|
||||||
if( ch != std::numeric_limits<TCHAR>::max() )
|
if( ch != std::numeric_limits<TCHAR>::max() )
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
|
@ -828,8 +829,7 @@ bool cEncoder::OnlyOneCatagoryPerChar() const
|
||||||
ach[0] = ch;
|
ach[0] = ch;
|
||||||
for( sack_type::const_iterator atE = m_encodings.begin(); atE != m_encodings.end(); atE++ )
|
for( sack_type::const_iterator atE = m_encodings.begin(); atE != m_encodings.end(); atE++ )
|
||||||
{
|
{
|
||||||
TSTRING::const_iterator first(&ach[0]), last(&ach[1]);
|
if( (*atE)->NeedsEncoding( ach.begin(), ach.end() ) )
|
||||||
if( (*atE)->NeedsEncoding( first, last ) )
|
|
||||||
{
|
{
|
||||||
if( fFailedATest )
|
if( fFailedATest )
|
||||||
return false; // each char can only fail one test
|
return false; // each char can only fail one test
|
||||||
|
|
|
@ -55,7 +55,7 @@ template <class T> class AbstractField : public AbstractRing<T>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool IsUnit(const typename T::Element &a) const
|
bool IsUnit(const typename T::Element &a) const
|
||||||
{return !Equal(a, this->Zero());}
|
{return !this->Equal(a, this->Zero());}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> class AbstractEuclideanDomain : public AbstractRing<T>
|
template <class T> class AbstractEuclideanDomain : public AbstractRing<T>
|
||||||
|
@ -273,7 +273,7 @@ template <class T> T AbstractEuclideanDomain<T>::Gcd(const Element &a, const Ele
|
||||||
Element g[3]={b, a};
|
Element g[3]={b, a};
|
||||||
unsigned int i0=0, i1=1, i2=2;
|
unsigned int i0=0, i1=1, i2=2;
|
||||||
|
|
||||||
while (!Equal(g[i1], this->Zero()))
|
while (!this->Equal(g[i1], this->Zero()))
|
||||||
{
|
{
|
||||||
g[i2] = Mod(g[i0], g[i1]);
|
g[i2] = Mod(g[i0], g[i1]);
|
||||||
unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
|
unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
|
||||||
|
@ -289,7 +289,7 @@ template <class T> typename QuotientRing<T>::Element QuotientRing<T>::Multiplica
|
||||||
typename T::Element y;
|
typename T::Element y;
|
||||||
unsigned int i0=0, i1=1, i2=2;
|
unsigned int i0=0, i1=1, i2=2;
|
||||||
|
|
||||||
while (!Equal(g[i1], Zero()))
|
while (!this->Equal(g[i1], Zero()))
|
||||||
{
|
{
|
||||||
// y = g[i0] / g[i1];
|
// y = g[i0] / g[i1];
|
||||||
// g[i2] = g[i0] % g[i1];
|
// g[i2] = g[i0] % g[i1];
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
class cDefaultSpecMask : public iFCOSpecMask
|
class cDefaultSpecMask : public iFCOSpecMask
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
cDefaultSpecMask() {}
|
||||||
virtual const TSTRING& GetName() const;
|
virtual const TSTRING& GetName() const;
|
||||||
virtual bool Accept(const iFCO* pFCO) const;
|
virtual bool Accept(const iFCO* pFCO) const;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdtwadmin.h"
|
#include "stdtwadmin.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "twadmincl.h"
|
#include "twadmincl.h"
|
||||||
#include "twadminstrings.h"
|
#include "twadminstrings.h"
|
||||||
|
|
Loading…
Reference in New Issue