summaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/vespamalloc/util/index.h
diff options
context:
space:
mode:
Diffstat (limited to 'vespamalloc/src/vespamalloc/util/index.h')
-rw-r--r--vespamalloc/src/vespamalloc/util/index.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/vespamalloc/src/vespamalloc/util/index.h b/vespamalloc/src/vespamalloc/util/index.h
index f7513114edc..b2c20f7bf02 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 <vespa/vespalib/util/atomic.h>
-#include <stdio.h>
+#include <cstddef>
namespace vespamalloc {
@@ -20,19 +19,4 @@ 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 vespalib::Atomic::postInc(&_index); }
- index_t operator -- (int) { return vespalib::Atomic::postDec(&_index); }
- index_t operator += (index_t v) { return _index += v; }
- index_t operator -= (index_t v) { return _index -= v; }
-private:
- index_t _index;
-};
-
}
-