mirror of https://github.com/djcb/mu.git
mu: fix clang compilation
This commit is contained in:
parent
72e67ca389
commit
e119ac919b
|
@ -98,9 +98,6 @@ using CommandMap = std::unordered_map<std::string, CommandInfo>;
|
||||||
void invoke(const Command::CommandMap& cmap, const Sexp::Node& call);
|
void invoke(const Command::CommandMap& cmap, const Sexp::Node& call);
|
||||||
|
|
||||||
|
|
||||||
} // namespace Command
|
|
||||||
|
|
||||||
|
|
||||||
static inline std::ostream&
|
static inline std::ostream&
|
||||||
operator<<(std::ostream& os, const Command::ArgInfo& info)
|
operator<<(std::ostream& os, const Command::ArgInfo& info)
|
||||||
{
|
{
|
||||||
|
@ -129,6 +126,8 @@ operator<<(std::ostream& os, const Command::CommandMap& map)
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Command
|
||||||
} // namespace Mu
|
} // namespace Mu
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ parsing_error(size_t pos, const char* frm, ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
if (pos == 0)
|
if (pos == 0)
|
||||||
return Mu::Error(Error::Code::Parsing, "%s", msg);
|
return Mu::Error(Error::Code::Parsing, "%s", msg.c_str());
|
||||||
else
|
else
|
||||||
return Mu::Error(Error::Code::Parsing, "%zu: %s", msg.c_str());
|
return Mu::Error(Error::Code::Parsing, "%zu: %s", msg.c_str());
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ parse (const std::string& expr, size_t& pos)
|
||||||
else if (isalpha(kar) || kar == ':')
|
else if (isalpha(kar) || kar == ':')
|
||||||
return parse_symbol(expr, pos);
|
return parse_symbol(expr, pos);
|
||||||
else
|
else
|
||||||
throw parsing_error(pos, "unexpected character '%c" + kar);
|
throw parsing_error(pos, "unexpected character '%c", kar);
|
||||||
}();
|
}();
|
||||||
|
|
||||||
pos = skip_whitespace(expr, pos);
|
pos = skip_whitespace(expr, pos);
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ostream>
|
|
||||||
|
|
||||||
|
|
||||||
#include "utils/mu-error.hh"
|
#include "utils/mu-error.hh"
|
||||||
|
|
||||||
|
@ -79,8 +77,6 @@ struct Node {
|
||||||
*/
|
*/
|
||||||
Node parse(const std::string& expr);
|
Node parse(const std::string& expr);
|
||||||
|
|
||||||
} // Sexp
|
|
||||||
|
|
||||||
static inline std::ostream&
|
static inline std::ostream&
|
||||||
operator<<(std::ostream& os, Sexp::Type id)
|
operator<<(std::ostream& os, Sexp::Type id)
|
||||||
{
|
{
|
||||||
|
@ -110,6 +106,10 @@ operator<<(std::ostream& os, const Sexp::Node& node)
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // Sexp
|
||||||
|
|
||||||
|
|
||||||
} // Mu
|
} // Mu
|
||||||
|
|
||||||
#endif /* MU_SEXP_PARSER_HH__ */
|
#endif /* MU_SEXP_PARSER_HH__ */
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
namespace Mu {
|
namespace Mu {
|
||||||
|
|
||||||
|
@ -165,7 +166,6 @@ static inline std::string to_string (const T& val)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* don't repeat these catch blocks everywhere...
|
* don't repeat these catch blocks everywhere...
|
||||||
|
|
|
@ -1030,8 +1030,8 @@ remove_handler (Context& context, const Parameters& params)
|
||||||
|
|
||||||
if (!mu_store_remove_path (context.store, path.c_str()))
|
if (!mu_store_remove_path (context.store, path.c_str()))
|
||||||
throw Error(Error::Code::Store,
|
throw Error(Error::Code::Store,
|
||||||
"failed to remove message @ %s (%d) from store",
|
"failed to remove message @ %s (%d) from store",
|
||||||
path, docid);
|
path.c_str(), docid);
|
||||||
|
|
||||||
print_expr ("(:remove %u)", docid);
|
print_expr ("(:remove %u)", docid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue