Skip to content

Commit 47b2167

Browse files
committed
Keep sorted check for now
1 parent a0a52a1 commit 47b2167

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ set(Boost_USE_STATIC_LIBS OFF)
5252
set(Boost_USE_MULTITHREADED ON)
5353
set(Boost_USE_STATIC_RUNTIME OFF)
5454
set(Boost_PYTHON_VERSION ${Python_VERSION})
55-
find_package(Boost COMPONENTS python REQUIRED)
55+
find_package(Boost CONFIG COMPONENTS python REQUIRED)
5656

5757
# Interface library for flags and library dependencies
5858
add_library(spt3g INTERFACE)

core/include/core/G3Timestream.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ class G3TimestreamMap : public G3FrameObject,
253253
void FromBuffer(const std::vector<std::string>& keys, std::size_t n_samples,
254254
std::shared_ptr<SampleType[]> data, G3Time start, G3Time stop,
255255
G3Timestream::TimestreamUnits units=G3Timestream::None, int compression_level=0) {
256+
if(!std::is_sorted(keys.begin(), keys.end()))
257+
throw std::runtime_error("G3TimestreamMap::MakeCompact: keys must be sorted");
256258
const auto data_type=G3Timestream::TimeStreamTypeResolver<SampleType>::type_tag;
257259
std::size_t offset = 0;
258260
for (const auto& key : keys) {

0 commit comments

Comments
 (0)