fix(*): style and clang warnings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
968c0d799f
commit
42e253c962
4 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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(); }
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,9 +70,10 @@ 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) {
|
||||
if (n.is_black())
|
||||
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue