remove pointless double initialization guards
this isn't some fuzzy logic, the call sequence is well determined. Change-Id: I1696b49ed687da83d2969efcfe23ac6565630020 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
12b7b2c643
commit
84c80538af
@ -131,7 +131,7 @@ bool MakefileGenerator::mkdir(const QString &in_path) const
|
||||
|
||||
// ** base makefile generator
|
||||
MakefileGenerator::MakefileGenerator() :
|
||||
init_opath_already(false), init_already(false), no_io(false), project(0)
|
||||
no_io(false), project(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -167,10 +167,7 @@ MakefileGenerator::verifyCompilers()
|
||||
void
|
||||
MakefileGenerator::initOutPaths()
|
||||
{
|
||||
if(init_opath_already)
|
||||
return;
|
||||
verifyCompilers();
|
||||
init_opath_already = true;
|
||||
ProValueMap &v = project->variables();
|
||||
//for shadow builds
|
||||
if(!v.contains("QMAKE_ABSOLUTE_SOURCE_PATH")) {
|
||||
@ -413,10 +410,7 @@ void
|
||||
MakefileGenerator::init()
|
||||
{
|
||||
initOutPaths();
|
||||
if(init_already)
|
||||
return;
|
||||
verifyCompilers();
|
||||
init_already = true;
|
||||
|
||||
ProValueMap &v = project->variables();
|
||||
|
||||
|
@ -71,7 +71,7 @@ struct ReplaceExtraCompilerCacheKey;
|
||||
class MakefileGenerator : protected QMakeSourceFileInfo
|
||||
{
|
||||
QString spec;
|
||||
bool init_opath_already, init_already, no_io;
|
||||
bool no_io;
|
||||
QHash<QString, bool> init_compiler_already;
|
||||
QString makedir, chkexists;
|
||||
QString build_args(const QString &outdir=QString());
|
||||
|
@ -55,17 +55,14 @@ QString project_builtin_regx() //calculate the builtin regular expression..
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProjectGenerator::ProjectGenerator() : MakefileGenerator(), init_flag(false)
|
||||
ProjectGenerator::ProjectGenerator() : MakefileGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ProjectGenerator::init()
|
||||
{
|
||||
if(init_flag)
|
||||
return;
|
||||
int file_count = 0;
|
||||
init_flag = true;
|
||||
verifyCompilers();
|
||||
|
||||
project->loadSpec();
|
||||
|
@ -40,7 +40,6 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class ProjectGenerator : public MakefileGenerator
|
||||
{
|
||||
bool init_flag;
|
||||
bool addFile(QString);
|
||||
bool addConfig(const QString &, bool add=true);
|
||||
QString getWritableVar(const char *, bool fixPath=true);
|
||||
|
@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
|
||||
void
|
||||
UnixMakefileGenerator::init()
|
||||
{
|
||||
if(init_flag)
|
||||
return;
|
||||
init_flag = true;
|
||||
|
||||
if(project->isEmpty("QMAKE_EXTENSION_SHLIB")) {
|
||||
if(project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
|
||||
project->values("QMAKE_EXTENSION_SHLIB").append("so");
|
||||
|
@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class UnixMakefileGenerator : public MakefileGenerator
|
||||
{
|
||||
bool init_flag, include_deps;
|
||||
bool include_deps;
|
||||
QString libtoolFileName(bool fixify=true);
|
||||
void writeLibtoolFile(); // for libtool
|
||||
void writePrlFile(QTextStream &);
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), init_flag(false), include_deps(false)
|
||||
UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), include_deps(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator(), init_flag(false)
|
||||
MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator()
|
||||
{
|
||||
if (isWindowsShell())
|
||||
quote = "\"";
|
||||
@ -218,10 +218,6 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
|
||||
|
||||
void MingwMakefileGenerator::init()
|
||||
{
|
||||
if(init_flag)
|
||||
return;
|
||||
init_flag = true;
|
||||
|
||||
/* this should probably not be here, but I'm using it to wrap the .t files */
|
||||
if(project->first("TEMPLATE") == "app")
|
||||
project->values("QMAKE_APP_FLAG").append("1");
|
||||
|
@ -63,7 +63,6 @@ private:
|
||||
|
||||
virtual bool findLibraries();
|
||||
|
||||
bool init_flag;
|
||||
QString objectsLinkLine;
|
||||
QString quote;
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ static QString nmakePathList(const QStringList &list)
|
||||
.replace('#', QStringLiteral("^#")).replace('$', QStringLiteral("$$"));
|
||||
}
|
||||
|
||||
NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), init_flag(false), usePCH(false)
|
||||
NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), usePCH(false)
|
||||
{
|
||||
|
||||
}
|
||||
@ -335,10 +335,6 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
|
||||
|
||||
void NmakeMakefileGenerator::init()
|
||||
{
|
||||
if(init_flag)
|
||||
return;
|
||||
init_flag = true;
|
||||
|
||||
/* this should probably not be here, but I'm using it to wrap the .t files */
|
||||
if(project->first("TEMPLATE") == "app")
|
||||
project->values("QMAKE_APP_FLAG").append("1");
|
||||
|
@ -40,7 +40,6 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class NmakeMakefileGenerator : public Win32MakefileGenerator
|
||||
{
|
||||
bool init_flag;
|
||||
void writeNmakeParts(QTextStream &);
|
||||
bool writeMakefile(QTextStream &);
|
||||
void writeImplicitRulesPart(QTextStream &t);
|
||||
|
@ -208,7 +208,6 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos
|
||||
|
||||
VcprojGenerator::VcprojGenerator()
|
||||
: Win32MakefileGenerator(),
|
||||
init_flag(false),
|
||||
is64Bit(false),
|
||||
projectWriter(0)
|
||||
{
|
||||
@ -767,9 +766,6 @@ bool VcprojGenerator::hasBuiltinCompiler(const QString &file)
|
||||
|
||||
void VcprojGenerator::init()
|
||||
{
|
||||
if (init_flag)
|
||||
return;
|
||||
init_flag = true;
|
||||
is64Bit = (project->first("QMAKE_TARGET.arch") == "x86_64");
|
||||
projectWriter = createProjectWriter();
|
||||
|
||||
|
@ -49,7 +49,6 @@ class QUuid;
|
||||
struct VcsolutionDepend;
|
||||
class VcprojGenerator : public Win32MakefileGenerator
|
||||
{
|
||||
bool init_flag;
|
||||
bool is64Bit;
|
||||
bool writeVcprojParts(QTextStream &);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user