diff --git a/core-buffer/test/main.cpp b/core-buffer/test/main.cpp index 9dd8358..e379d99 100644 --- a/core-buffer/test/main.cpp +++ b/core-buffer/test/main.cpp @@ -1,7 +1,6 @@ #include "gtest/gtest.h" #include "test_buffer_utils.cpp" #include "test_bitshuffle.cpp" -#include "test_FastQueue.cpp" using namespace std; diff --git a/core-buffer/include/FastQueue.hpp b/sf-stream/include/FastQueue.hpp similarity index 100% rename from core-buffer/include/FastQueue.hpp rename to sf-stream/include/FastQueue.hpp diff --git a/core-buffer/src/FastQueue.cpp b/sf-stream/src/FastQueue.cpp similarity index 95% rename from core-buffer/src/FastQueue.cpp rename to sf-stream/src/FastQueue.cpp index 69cb2c0..1db833e 100644 --- a/core-buffer/src/FastQueue.cpp +++ b/sf-stream/src/FastQueue.cpp @@ -73,7 +73,7 @@ void FastQueue::commit() } write_slot_id_++; - write_slot_id_ = write_slot_id_ % n_slots_; + write_slot_id_ %= n_slots_; } template @@ -100,8 +100,9 @@ void FastQueue::release() } read_slot_id_++; - read_slot_id_ = read_slot_id_ % n_slots_; + read_slot_id_ %= n_slots_; } +template class FastQueue; template class FastQueue; template class FastQueue; diff --git a/sf-stream/test/main.cpp b/sf-stream/test/main.cpp index e1b1b18..e4c5df7 100644 --- a/sf-stream/test/main.cpp +++ b/sf-stream/test/main.cpp @@ -1,5 +1,6 @@ #include "gtest/gtest.h" #include "test_LiveRecvModule.cpp" +#include "test_FastQueue.cpp" using namespace std; diff --git a/core-buffer/test/test_FastQueue.cpp b/sf-stream/test/test_FastQueue.cpp similarity index 100% rename from core-buffer/test/test_FastQueue.cpp rename to sf-stream/test/test_FastQueue.cpp