summaryrefslogtreecommitdiffstats
path: root/vespamalloc
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-01-07 00:07:02 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-01-07 00:07:02 +0100
commit70eb84c84a1da2ed166119686972b5714c0b1975 (patch)
tree008d5297a262e140fa9fc2678ab76bbfa0d3526b /vespamalloc
parent991a5fdd1ba1cfd6a903e2702fb39fd8c5ce75aa (diff)
Remove unused code.
Diffstat (limited to 'vespamalloc')
-rw-r--r--vespamalloc/src/vespamalloc/util/index.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/vespamalloc/src/vespamalloc/util/index.h b/vespamalloc/src/vespamalloc/util/index.h
index 59c9b3a1801..3bfa4fbe7e5 100644
--- a/vespamalloc/src/vespamalloc/util/index.h
+++ b/vespamalloc/src/vespamalloc/util/index.h
@@ -1,8 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <atomic>
-#include <stdio.h>
+#include <cstddef>
namespace vespamalloc {
@@ -20,19 +19,5 @@ private:
index_t _index;
};
-class AtomicIndex
-{
-public:
- typedef size_t index_t;
- AtomicIndex(index_t index = 0) : _index(index) { }
- operator index_t () const { return _index; }
- index_t operator ++ (int) { return _index.fetch_add(1); }
- index_t operator -- (int) { return _index.fetch_sub(1); }
- index_t operator += (index_t v) { return _index.fetch_add(v); }
- index_t operator -= (index_t v) { return _index.fetch_sub(v); }
-private:
- std::atomic<index_t> _index;
-};
-
}