mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-12 23:37:13 +02:00
fix warnings
This commit is contained in:
@ -12,7 +12,12 @@ class RawFile : public FileInterface {
|
||||
|
||||
public:
|
||||
std::filesystem::path m_fname; // TO be made private!
|
||||
void write(Frame &frame) override{};
|
||||
|
||||
// pragma to ignore warnings
|
||||
void write(Frame &frame) override{
|
||||
throw std::runtime_error("Not implemented");
|
||||
};
|
||||
|
||||
Frame read() override { return get_frame(this->current_frame++); };
|
||||
std::vector<Frame> read(size_t n_frames) override;
|
||||
void read_into(std::byte *image_buf) override { return get_frame_into(this->current_frame++, image_buf); };
|
||||
|
@ -89,7 +89,7 @@ template <typename DataType> size_t SubFile::read_impl_flip(std::byte *buffer) {
|
||||
|
||||
size_t SubFile::frame_number(int frame_index) {
|
||||
sls_detector_header h{};
|
||||
FILE *fp = fopen(this->m_fname.c_str(), "r");
|
||||
fp = fopen(this->m_fname.c_str(), "r");
|
||||
if (!fp)
|
||||
throw std::runtime_error(fmt::format("Could not open: {} for reading", m_fname.c_str()));
|
||||
fseek(fp, (sizeof(sls_detector_header) + bytes_per_part()) * frame_index, SEEK_SET);
|
||||
|
@ -19,7 +19,7 @@ TEST_CASE("Read a 1D numpy file with int32 data type") {
|
||||
|
||||
// use the load function to read the full file into a NDArray
|
||||
auto data = f.load<int32_t, 1>();
|
||||
for (size_t i = 0; i < 10; i++) {
|
||||
for (int32_t i = 0; i < 10; i++) {
|
||||
REQUIRE(data(i) == i);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user