fix(*): style and clang warnings

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-02-22 08:42:08 -08:00
parent 968c0d799f
commit 42e253c962
4 changed files with 7 additions and 5 deletions

View file

@ -339,7 +339,7 @@ class level_deserializer : public object_deserializer<level> {
typedef object_deserializer<level> super;
public:
level read() {
return super::read([&]() {
return super::read([&]() -> level {
deserializer & d = get_owner();
auto k = static_cast<level_kind>(d.read_char());
switch (k) {

View file

@ -45,9 +45,8 @@ static void tst4() {
class ex : public exception {
std::function<char const *()> m_f;
ex(std::function<char const *()> const & f):m_f(f) {}
public:
template<typename F> ex(F && f):m_f(f) {}
ex(std::function<char const *()> const & f):m_f(f) {}
virtual exception * clone() const { return new ex(m_f); }
virtual void rethrow() const { throw *this; }
virtual char const * what() const noexcept { return m_f(); }

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <limits>
#include <algorithm>
#include "util/name_generator.h"
namespace lean {

View file

@ -6,6 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <utility>
#include <algorithm>
#include "util/rc.h"
#include "util/debug.h"
#include "util/buffer.h"
@ -69,8 +70,9 @@ class rb_tree : public CMP {
if (n.is_shared()) {
// std::cout << "SHARED\n";
return node(new node_cell(*n.m_ptr));
} else
} else {
return n;
}
}
static node set_black(node && n) {
@ -290,7 +292,7 @@ public:
lean_assert(check_invariant());
}
void erase_min(T const & v) {
void erase_min() {
m_root = set_black(erase_min(m_root.steal()));
lean_assert(check_invariant());
}