Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Jan 15, 2023
1 parent 296e8cb commit c889b56
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 45 deletions.
30 changes: 15 additions & 15 deletions include/bit7z/bitarchivereader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
* On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available),
* the format argument must be specified.
*
* @param lib the 7z library used.
* @param in_file the input archive file path.
* @param format the input archive format.
* @param password the password needed for opening the input archive.
* @param lib the 7z library used.
* @param in_archive the path to the archive to be read.
* @param format the format of the input archive.
* @param password the password needed for opening the input archive.
*/
BitArchiveReader( const Bit7zLibrary& lib,
const tstring& in_file,
const tstring& in_archive,
const BitInFormat& format BIT7Z_DEFAULT_FORMAT,
const tstring& password = {} );

Expand All @@ -51,13 +51,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
* On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available),
* the format argument must be specified.
*
* @param lib the 7z library used.
* @param in_buffer the input buffer containing the archive.
* @param format the input archive format.
* @param password the password needed for opening the input archive.
* @param lib the 7z library used.
* @param in_archive the input buffer containing the archive to be read.
* @param format the format of the input archive.
* @param password the password needed for opening the input archive.
*/
BitArchiveReader( const Bit7zLibrary& lib,
const vector< byte_t >& in_buffer,
const vector< byte_t >& in_archive,
const BitInFormat& format BIT7Z_DEFAULT_FORMAT,
const tstring& password = {} );

Expand All @@ -69,13 +69,13 @@ class BitArchiveReader final : public BitAbstractArchiveOpener, public BitInputA
* On the contrary, when `BIT7Z_AUTO_FORMAT` is not defined (i.e., no auto format detection available),
* the format argument must be specified.
*
* @param lib the 7z library used.
* @param in_stream the standard input stream of the archive.
* @param format the input archive format.
* @param password the password needed for opening the input archive.
* @param lib the 7z library used.
* @param in_archive the standard input stream of the archive to be read.
* @param format the format of the input archive.
* @param password the password needed for opening the input archive.
*/
BitArchiveReader( const Bit7zLibrary& lib,
std::istream& in_stream,
std::istream& in_archive,
const BitInFormat& format BIT7Z_DEFAULT_FORMAT,
const tstring& password = {} );

Expand Down
30 changes: 15 additions & 15 deletions include/bit7z/bitarchivewriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,39 @@ class BitArchiveWriter : public BitAbstractArchiveCreator, public BitOutputArchi
/**
* @brief Constructs a BitArchiveWriter object, reading the given archive file path.
*
* @param lib the 7z library to use.
* @param in_file the path to an input archive file.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
* @param lib the 7z library to use.
* @param in_archive the path to an input archive file.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
*/
BitArchiveWriter( const Bit7zLibrary& lib,
const tstring& in_file,
const tstring& in_archive,
const BitInOutFormat& format,
const tstring& password = {} );

/**
* @brief Constructs a BitArchiveWriter object, reading the archive in the given buffer.
*
* @param lib the 7z library to use.
* @param in_buffer the buffer containing the input archive.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
* @param lib the 7z library to use.
* @param in_archive the buffer containing the input archive.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
*/
BitArchiveWriter( const Bit7zLibrary& lib,
const vector< byte_t >& in_buffer,
const vector< byte_t >& in_archive,
const BitInOutFormat& format,
const tstring& password = {} );

/**
* @brief Constructs a BitArchiveWriter object, reading the archive from the given standard input stream.
*
* @param lib the 7z library to use.
* @param in_stream the standard stream of the input archive.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
* @param lib the 7z library to use.
* @param in_archive the standard stream of the input archive.
* @param format the input/output archive format.
* @param password (optional) the password needed to read the input archive.
*/
BitArchiveWriter( const Bit7zLibrary& lib,
std::istream& in_stream,
std::istream& in_archive,
const BitInOutFormat& format,
const tstring& password = {} );
};
Expand Down
4 changes: 2 additions & 2 deletions include/bit7z/bitextractor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ class BitExtractor final : public BitAbstractArchiveOpener {
input_archive.extract( out_dir, matched_indices );
}

void extractMatchingFilter( Input in_arch,
void extractMatchingFilter( Input in_archive,
vector< byte_t >& out_buffer,
FilterPolicy policy,
const function< bool( const tstring& ) >& filter ) const {
BitInputArchive input_archive( *this, in_arch );
BitInputArchive input_archive( *this, in_archive );

const bool should_extract_matched_item = policy == FilterPolicy::Include;
// Searching for files inside the archive that match the given filter
Expand Down
12 changes: 6 additions & 6 deletions src/bitarchivereader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
using namespace bit7z;

BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib,
const tstring& in_file,
const tstring& in_archive,
const BitInFormat& format,
const tstring& password )
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_file ) {}
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {}

BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib,
const vector< byte_t >& in_buffer,
const vector< byte_t >& in_archive,
const BitInFormat& format,
const tstring& password )
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_buffer ) {}
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {}

BitArchiveReader::BitArchiveReader( const Bit7zLibrary& lib,
std::istream& in_stream,
std::istream& in_archive,
const BitInFormat& format,
const tstring& password )
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_stream ) {}
: BitAbstractArchiveOpener( lib, format, password ), BitInputArchive( *this, in_archive ) {}

map< BitProperty, BitPropVariant > BitArchiveReader::archiveProperties() const {
map< BitProperty, BitPropVariant > result;
Expand Down
12 changes: 6 additions & 6 deletions src/bitarchivewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib, const BitInOutForma
: BitAbstractArchiveCreator( lib, format ), BitOutputArchive( *this, tstring{} ) {}

BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
const tstring& in_file,
const tstring& in_archive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, in_file ) {}
BitOutputArchive( *this, in_archive ) {}

BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
const std::vector< byte_t >& in_buffer,
const std::vector< byte_t >& in_archive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, in_buffer ) {}
BitOutputArchive( *this, in_archive ) {}

BitArchiveWriter::BitArchiveWriter( const Bit7zLibrary& lib,
std::istream& in_stream,
std::istream& in_archive,
const BitInOutFormat& format,
const tstring& password )
: BitAbstractArchiveCreator( lib, format, password, UpdateMode::Append ),
BitOutputArchive( *this, in_stream ) {}
BitOutputArchive( *this, in_archive ) {}

} // namespace bit7z
5 changes: 4 additions & 1 deletion src/bitinputarchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "internal/cfileinstream.hpp"
#include "internal/fileextractcallback.hpp"
#include "internal/fixedbufferextractcallback.hpp"
#include "internal/fsutil.hpp"
#include "internal/streamextractcallback.hpp"
#include "internal/opencallback.hpp"
#include "internal/util.hpp"
Expand All @@ -33,6 +32,10 @@
#include "internal/formatdetect.hpp"
#endif

#if defined( _WIN32 ) && defined( BIT7Z_AUTO_PREFIX_LONG_PATHS )
#include "internal/fsutil.hpp"
#endif

using namespace bit7z;
using namespace NWindows;
using namespace NArchive;
Expand Down

0 comments on commit c889b56

Please sign in to comment.