Skip to content

Commit

Permalink
[FIX] Update some parts after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
rrahn committed Jul 11, 2019
1 parent f3f4b52 commit 8d85f58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/seqan3/io/detail/magic_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <array>
#include <tuple>

#include <seqan3/core/metafunction/template_inspection.hpp>
#include <seqan3/core/type_traits/template_inspection.hpp>
#include <seqan3/core/platform.hpp>
#include <seqan3/core/type_list.hpp>

Expand Down
7 changes: 6 additions & 1 deletion include/seqan3/io/detail/misc_input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ inline auto make_secondary_istream(std::basic_istream<char_t> & primary_stream,
if (read_chars == magic_number.size() && contrib::_bgzfCheckHeader(magic_number.data())) // BGZF
{
#ifdef SEQAN3_HAS_ZLIB
if ((extension == ".gz") || (extension == ".bgzf"))
if ((std::ranges::find(gz_compression::file_extensions, extension) !=
std::ranges::end(gz_compression::file_extensions)) ||
(std::ranges::find(bgzf_compression::file_extensions, extension) !=
std::ranges::end(bgzf_compression::file_extensions)))
{
filename.replace_extension();
}

return {new contrib::basic_bgzf_istream<char_t>{primary_stream},
stream_deleter_default};
Expand Down
2 changes: 1 addition & 1 deletion test/unit/io/detail/misc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <string>
#include <vector>

#include <seqan3/io/detail/magic_header.hpp>
#include <seqan3/io/detail/misc.hpp>
#include <seqan3/std/ranges>
#include <seqan3/test/tmp_filename.hpp>
Expand Down Expand Up @@ -54,7 +55,6 @@ TEST(misc, valid_file_extensions)

TEST(misc, valid_compression_extensions)
{

std::vector<std::string> valid_compression = detail::valid_file_extensions<detail::compression_formats>();

#if defined(SEQAN3_HAS_ZLIB)
Expand Down

0 comments on commit 8d85f58

Please sign in to comment.