@@ -32,7 +32,6 @@ class IndirectionArray;
32
32
LOCK_FREE_ARRAY_TEMPLATE_ARGUMENTS
33
33
LOCK_FREE_ARRAY_TYPE::LockFreeArray (){
34
34
new_lock_free_array.clear ();
35
- lock_free_array.reset (new lock_free_array_t ());
36
35
}
37
36
38
37
LOCK_FREE_ARRAY_TEMPLATE_ARGUMENTS
@@ -44,7 +43,6 @@ LOCK_FREE_ARRAY_TEMPLATE_ARGUMENTS
44
43
bool LOCK_FREE_ARRAY_TYPE::Update (const std::size_t &offset, ValueType value){
45
44
PL_ASSERT (offset <= LOCK_FREE_ARRAY_MAX_SIZE);
46
45
LOG_TRACE (" Update at %lu" , lock_free_array_offset.load ());
47
- lock_free_array->at (offset) = value;
48
46
if (new_lock_free_array.size () < offset + 1 ) {
49
47
new_lock_free_array.resize (LOCK_FREE_ARRAY_MAX_SIZE);
50
48
}
@@ -55,7 +53,6 @@ bool LOCK_FREE_ARRAY_TYPE::Update(const std::size_t &offset, ValueType value){
55
53
LOCK_FREE_ARRAY_TEMPLATE_ARGUMENTS
56
54
bool LOCK_FREE_ARRAY_TYPE::Append (ValueType value){
57
55
LOG_TRACE (" Appended at %lu" , lock_free_array_offset.load ());
58
- lock_free_array->at (lock_free_array_offset++) = value;
59
56
new_lock_free_array.push_back (value);
60
57
return true ;
61
58
}
@@ -64,7 +61,6 @@ LOCK_FREE_ARRAY_TEMPLATE_ARGUMENTS
64
61
bool LOCK_FREE_ARRAY_TYPE::Erase (const std::size_t &offset, const ValueType& invalid_value){
65
62
PL_ASSERT (offset <= LOCK_FREE_ARRAY_MAX_SIZE);
66
63
LOG_TRACE (" Erase at %lu" , offset);
67
- lock_free_array->at (offset) = invalid_value;
68
64
new_lock_free_array.at (offset) = invalid_value;
69
65
return true ;
70
66
}
0 commit comments