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;
|
typedef object_deserializer<level> super;
|
||||||
public:
|
public:
|
||||||
level read() {
|
level read() {
|
||||||
return super::read([&]() {
|
return super::read([&]() -> level {
|
||||||
deserializer & d = get_owner();
|
deserializer & d = get_owner();
|
||||||
auto k = static_cast<level_kind>(d.read_char());
|
auto k = static_cast<level_kind>(d.read_char());
|
||||||
switch (k) {
|
switch (k) {
|
||||||
|
|
|
@ -45,9 +45,8 @@ static void tst4() {
|
||||||
|
|
||||||
class ex : public exception {
|
class ex : public exception {
|
||||||
std::function<char const *()> m_f;
|
std::function<char const *()> m_f;
|
||||||
ex(std::function<char const *()> const & f):m_f(f) {}
|
|
||||||
public:
|
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 exception * clone() const { return new ex(m_f); }
|
||||||
virtual void rethrow() const { throw *this; }
|
virtual void rethrow() const { throw *this; }
|
||||||
virtual char const * what() const noexcept { return m_f(); }
|
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
|
Author: Leonardo de Moura
|
||||||
*/
|
*/
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <algorithm>
|
||||||
#include "util/name_generator.h"
|
#include "util/name_generator.h"
|
||||||
|
|
||||||
namespace lean {
|
namespace lean {
|
||||||
|
|
|
@ -6,6 +6,7 @@ Author: Leonardo de Moura
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <algorithm>
|
||||||
#include "util/rc.h"
|
#include "util/rc.h"
|
||||||
#include "util/debug.h"
|
#include "util/debug.h"
|
||||||
#include "util/buffer.h"
|
#include "util/buffer.h"
|
||||||
|
@ -69,8 +70,9 @@ class rb_tree : public CMP {
|
||||||
if (n.is_shared()) {
|
if (n.is_shared()) {
|
||||||
// std::cout << "SHARED\n";
|
// std::cout << "SHARED\n";
|
||||||
return node(new node_cell(*n.m_ptr));
|
return node(new node_cell(*n.m_ptr));
|
||||||
} else
|
} else {
|
||||||
return n;
|
return n;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static node set_black(node && n) {
|
static node set_black(node && n) {
|
||||||
|
@ -290,7 +292,7 @@ public:
|
||||||
lean_assert(check_invariant());
|
lean_assert(check_invariant());
|
||||||
}
|
}
|
||||||
|
|
||||||
void erase_min(T const & v) {
|
void erase_min() {
|
||||||
m_root = set_black(erase_min(m_root.steal()));
|
m_root = set_black(erase_min(m_root.steal()));
|
||||||
lean_assert(check_invariant());
|
lean_assert(check_invariant());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue