freebsd-ports/devel/fam/files/patch-include__BTree.h
Matthias Andree 8151e37e93 - Fix build with libc++, dropping hardcoded -lstdc++ from the right Makefile.
- Fix build with clang, casting a large constant to int in mntent_compat.c++.
- Fix a noisy clang warning in BTree.h by parenthesizing the 2nd for() expr.
- Fix a format string mismatch (%d/size_t -> %lu/unsigned long) in snprintf.
- Regenerate patches, and normalize their filenames, with make makepatch.
- Bump PORTREVISION.
2014-01-03 01:45:45 +00:00

65 lines
1.6 KiB
C++

--- ./include/BTree.h.orig 2003-04-15 06:21:19.000000000 +0200
+++ ./include/BTree.h 2014-01-03 02:35:37.000000000 +0100
@@ -236,7 +236,7 @@
// to the right and returns them.
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::Node::remove(unsigned j)
{
Key k = key[j];
@@ -318,7 +318,7 @@
assert(root->n);
Node *p, *q;
- for (p = root; q = p->link[0]; p = q)
+ for (p = root; (q = p->link[0]); p = q)
continue;
return p->key[0];
}
@@ -348,7 +348,7 @@
}
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::Node::next(const Key& pred) const
{
if (!this)
@@ -404,7 +404,7 @@
// nodes as necessary on the way back.
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::insert(Node *p, const Key& key, const Value& value)
{
if (!p) return Closure(key, value, NULL);
@@ -499,7 +499,7 @@
// Returns UNDER if node p is too small afterward, OK otherwise.
template <class Key, class Value>
-BTree<Key, Value>::Status
+typename BTree<Key, Value>::Status
BTree<Key, Value>::underflow(Node *p, unsigned i)
{
assert(p);
@@ -557,7 +557,7 @@
template <class Key, class Value>
-BTree<Key, Value>::Closure
+typename BTree<Key, Value>::Closure
BTree<Key, Value>::remove_rightmost(Node *p)
{
int i = p->n;
@@ -587,7 +587,7 @@
// back up.
template <class Key, class Value>
-BTree<Key, Value>::Status
+typename BTree<Key, Value>::Status
BTree<Key, Value>::remove(Node *p, const Key& key)
{
if (!p)