Remove unused argument 'async'

refs #9972
This commit is contained in:
Gunnar Beutner 2015-08-26 06:57:24 +02:00
parent 827125a69a
commit 1f63bcb1b3
7 changed files with 17 additions and 17 deletions

View File

@ -106,7 +106,7 @@ static char *ConsoleCompleteHelper(const char *word, int state)
Value value;
try {
Expression *expr = ConfigCompiler::CompileText("temp", pword, false);
Expression *expr = ConfigCompiler::CompileText("temp", pword);
if (expr)
value = expr->Evaluate(*l_ScriptFrame);
@ -238,7 +238,7 @@ incomplete:
try {
lines[fileName] = command;
expr = ConfigCompiler::CompileText(fileName, command, false);
expr = ConfigCompiler::CompileText(fileName, command);
if (expr) {
Value result = expr->Evaluate(scriptFrame);

View File

@ -74,7 +74,7 @@ static void IncludeModule(const String& modulePath, bool& success)
if (Utility::PathExists(modulePath + "/include.conf")) {
Expression *expr = ConfigCompiler::CompileFile(modulePath + "/include.conf",
true, String(), moduleName);
String(), moduleName);
if (!ExecuteExpression(expr))
success = false;
@ -91,7 +91,7 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs,
if (!configs.empty()) {
BOOST_FOREACH(const String& configPath, configs) {
Expression *expression = ConfigCompiler::CompileFile(configPath, true, String(), "_etc");
Expression *expression = ConfigCompiler::CompileFile(configPath, String(), "_etc");
success = ExecuteExpression(expression);
delete expression;
if (!success)

View File

@ -113,7 +113,7 @@ String ConfigCompiler::GetModule(void) const
void ConfigCompiler::CollectIncludes(std::vector<Expression *>& expressions,
const String& file, const String& zone, const String& module)
{
expressions.push_back(CompileFile(file, true, zone, module));
expressions.push_back(CompileFile(file, zone, module));
}
/**
@ -235,7 +235,7 @@ void ConfigCompiler::HandleLibrary(const String& library)
* @returns Configuration items.
*/
Expression *ConfigCompiler::CompileStream(const String& path,
std::istream *stream, bool async, const String& zone, const String& module)
std::istream *stream, const String& zone, const String& module)
{
CONTEXT("Compiling configuration stream with name '" + path + "'");
@ -258,8 +258,8 @@ Expression *ConfigCompiler::CompileStream(const String& path,
* @param path The path.
* @returns Configuration items.
*/
Expression *ConfigCompiler::CompileFile(const String& path, bool async,
const String& zone, const String& module)
Expression *ConfigCompiler::CompileFile(const String& path, const String& zone,
const String& module)
{
CONTEXT("Compiling configuration file '" + path + "'");
@ -274,7 +274,7 @@ Expression *ConfigCompiler::CompileFile(const String& path, bool async,
Log(LogInformation, "ConfigCompiler")
<< "Compiling config file: " << path;
return CompileStream(path, &stream, async, zone, module);
return CompileStream(path, &stream, zone, module);
}
/**
@ -285,10 +285,10 @@ Expression *ConfigCompiler::CompileFile(const String& path, bool async,
* @returns Configuration items.
*/
Expression *ConfigCompiler::CompileText(const String& path, const String& text,
bool async, const String& zone, const String& module)
const String& zone, const String& module)
{
std::stringstream stream(text);
return CompileStream(path, &stream, async, zone, module);
return CompileStream(path, &stream, zone, module);
}
/**

View File

@ -86,11 +86,11 @@ public:
Expression *Compile(void);
static Expression *CompileStream(const String& path, std::istream *stream,
bool async = true, const String& zone = String(), const String& module = String());
static Expression *CompileFile(const String& path, bool async = true,
const String& zone = String(), const String& module = String());
static Expression *CompileFile(const String& path, const String& zone = String(),
const String& module = String());
static Expression *CompileText(const String& path, const String& text,
bool async = true, const String& zone = String(), const String& module = String());
const String& zone = String(), const String& module = String());
static void AddIncludeSearchDir(const String& dir);

View File

@ -28,7 +28,7 @@
namespace { \
void RegisterConfigFragment(void) \
{ \
icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment, false); \
icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment); \
VERIFY(expression); \
icinga::ScriptFrame frame; \
expression->Evaluate(frame); \

View File

@ -633,7 +633,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream)
Expression *expr = NULL;
Value result;
try {
expr = ConfigCompiler::CompileText(fileName, m_Command, false);
expr = ConfigCompiler::CompileText(fileName, m_Command);
ScriptFrame frame;
frame.Locals = lsf.Locals;
frame.Self = lsf.Locals;

View File

@ -114,7 +114,7 @@ std::vector<ConfigObject::Ptr> FilterUtility::GetFilterTargets(const QueryDescri
ConfigType::Ptr dtype = ConfigType::GetByName(type);
ASSERT(dtype);
Expression *ufilter = ConfigCompiler::CompileText("<API query>", filter, false);
Expression *ufilter = ConfigCompiler::CompileText("<API query>", filter);
ScriptFrame frame;
frame.Sandboxed = true;