Skip to content

Commit

Permalink
Merge branch 'release/v3.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Oct 3, 2019
2 parents e4a6852 + b572cee commit c15f985
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 46 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ bit7z.sln
*.suppress

*.pro\.user*-pre1

*.opensdf

*.sdf
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,17 @@ if(MSVC)
if(MSVC_VERSION GREATER 1800)
target_compile_options(${TARGET_NAME} PRIVATE /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding)
endif()
# static runtime option
if(STATIC_RUNTIME)
set(CompilerFlags
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE)
foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
set(${CompilerFlag} "${${CompilerFlag}}" CACHE STRING "msvc compiler flags" FORCE)
message("MSVC flags: ${CompilerFlag}:${${CompilerFlag}}")
endforeach()
endif()
endif()
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bit7z

<p align="center">
<a href="https://github.com/rikyoz/bit7z/releases"><img src="https://img.shields.io/github/release/rikyoz/bit7z/all.svg?style=flat-square&logo=github&logoColor=white&colorB=blue&label=" alt="GitHub release"></a>
<img src="https://img.shields.io/badge/-MSVC%202012%20--%202019-red.svg?style=flat-square&logo=visual-studio-code&logoColor=white" alt="MSVC 2012 - 2019">
<img src="https://img.shields.io/badge/-MSVC%202012+-red.svg?style=flat-square&logo=visual-studio-code&logoColor=white" alt="MSVC 2012 - 2019">
<img src="https://img.shields.io/badge/-x86,%20x86__64-orange.svg?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAC1UlEQVR42u3WA9AjWRSA0bu2bdu2bdssrm3btm3btm3bmX+Ms7rLTiW9NUmvcsL7XuELu6Ojoz5DWcc5nvKp2kBdPvesi21m1Pgr7OxjrfWtgw0VZZjKM9rjXfNHM+bWWzutGo2YSH/tNm+jgNe1XzdDR322V41Tox5D6K4qY0WRtVRnjyhysercH0VeVJ13o8hXqvNNFOlSna4oUlOd2r8moBPwoQfd6THfoLweauqp6aJ8wInmMmjujWAFtwMeNJup5cXsVnWYDyDtajQjmMp7QOoypxGMbMtyAe+Ztf5/JTaJAkM6mjRXrj0KpE9zdZIyAV8bLX5lBIPlszXAVlGXMwAr5fwskL4wdPzAfGUC5o9kJy+o+dCVloiwJNg2907wimddZrqcB9GtNQF3RXI+kI5yCcgADwF6yvfLNa0JWD7n5dWXAa4lbZwrR7UioKdhc76vdEB+KxzbioAncxpGr9IBM+XKDa0IuCanaWkS8BzguEhqrQg4P6e5mgasbV+7WCySvWlFwIU5zdYooMhytCbghpzGLh9gAodCWjFXXwDSV4aJH5inWcBLkbzTOMBa9rWvk92jH5BWqBvwjSHKBfQ3as4HlvoSFq2b+zcB6bXIj6pZABvnPKzPgPSJlxV/hkUH5v7SUPiv2LN5wKuRjO82wDdON6xFSwW8XvhdcGYkrzUPYJf4lcktZh4jxg8sViqA9SKZxDo2NH0km1ImgE2jDjuBLXK6FPX1N1fUYQnKBnCeGeN3jGdPfUC+P27TyO7GjN8xoUMpHZCecKZ97etE9+hD6vKQOz1jgMa6u90J+VO9V//OaXnzgE5Al+p0iyLfqM63UeRV1Xk/ilylOo9Gkc1U55AoMrz+qjJJ1OMQ1bgq6jOYr1Rh9EgFZtd+q0QjVtFeW0UzFvGJ9uhhrSjDSE7UX6tdaMIoz0R2cbvXfKE2UJevvOEe+5kuOjr+qb4H0/HV/SQ0YjEAAAAASUVORK5CYII=" alt="x86, x86_64">
<a href="https://github.com/rikyoz/bit7z/wiki"><img src="https://img.shields.io/badge/-docs-yellow.svg?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAABCklEQVR42u3OAUQEARCF4SkKTgASgCIhCBRAQXHVSeEEgY6gAIggQiIACAISyAEkqigRiAKQAItEOlj1B1HU7nB2VvS+B4D3W/sYZZNzHnmlxQMHzNJhZWGCS346pdfi0c0u7/zulkr8fZM8WxaLffI902VxqOIbszhc41u0KAwAvoZFoQb4qhaFBr6UPotCHd+RxWEYzwv9Fok78qTMWyymeCNLizmLx2pGwhWDVg7GueG7lBOm6bQyMcQS62ywwiQ9JiJ/ARVGqLPDBctWLPY4zFyTY86454kva1YsEnwoIDJghoXPbUcHOKj9zwAFKEABClCAAhSgAAUoQAEKUIACSGhXYgpQgOsD2giqlbnGmc4AAAAASUVORK5CYII=" alt="Docs"></a>
<a href="#donations"><img src="https://img.shields.io/badge/-donations-green.svg?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABBCAMAAABW61JJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAv0CA7xBgrzDfn3BQIM+PWN4WLwAAAfhJREFUeF69llmS3CAQRLMWNi0t7n9ax/RI7lCOQMh2+H0DovQqo8A/RpNcksw0455Yu8i8ostabxFFB6sDSOcWqY7gC1p4HSPimlxHyU8dMAWXTJV4WkSpf3eFUIkib7xekC96aqE1M3ayeWXmxSOIjfd/CFMlNjjbhFCV3R4TJLaJemLqx0RgbFOpgr4igfKiud9scnVAaVfpuD2AP+O0gHjxL1JSRX/JbrrMoPSrKUl6EzRFpItSkm4qqICdDuAVLwAdRTXtWqRV48YFELpvkFaSllNMt4s0R5JlzRuEWCqjR3JSq0/2rKqa1J8kQNl2fcArAEK2tY7j+WMlkKbR/dl3m5SkEUoGQmFZ8DqIBCAcwSqUpHt8BpALBWZ8Jk0BwOIfm49mkk8rgJDqQQmUpC4pvpebn2xQkhq4mH4vs3K2yUn68JI3ZrZoOCKR2CZaSXLFmXUxYZvgmUSXy/rFbGYilzb7MynInc3eTIpdK76tIDhJa7uvPMX71503+qok06HXXQLKyeZkZqrjD9z56Kui6NGZScths0tnJm00GvqwMwFktzkGJ8mAw2af9kxSfmT14SQF2G5zFOGxnHabf3aAHX2VMcpGScy7zWGCycE7KkZz+yE8dsdZ9YtlopkxzsY2n8KPrMc42XzMRIl6TJjkNxH/kV+EeH5bYbU1DgAAAABJRU5ErkJggg==&logoColor=white" alt="Donations"></a>
Expand All @@ -25,11 +25,11 @@ bit7z

## Introduction

**bit7z** is a C++ static library which allows to compress and extract many file archive formats, all through a clean, simple and entirely object-oriented interface to the dynamic libraries from the 7-zip project (https://www.7-zip.org/).<br/>It supports compression and extraction to and from the filesystem or the memory, reading of archives metadata, updating existing archives, creation of multi-volume archives, operation progress callbacks and many other functionalities.
**bit7z** is a C++ static library which allows to compress and extract many file archive formats, all through a clean, simple and entirely object-oriented interface to the dynamic libraries from the 7-zip project (<https://www.7-zip.org/>).<br/>It supports compression and extraction to and from the filesystem or the memory, reading of archives metadata, updating existing archives, creation of multi-volume archives, operation progress callbacks and many other functionalities.

## Supported Features

+ **Compression** of files and directories using the following archive formats: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM.
+ **Compression** using the following archive formats: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM.
+ **Extraction** of the following archive formats: 7z, AR, ARJ, BZIP2, CAB, CHM, CPIO, CramFS, DEB, DMG, EXT, FAT, GPT, GZIP, HFS, HXS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RAR5, RPM, SquashFS, TAR, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR, XZ, Z and ZIP.
+ **Reading metadata** of archives and of their content (from v3.x).
+ **Testing** archives for errors (from v3.x).
Expand Down Expand Up @@ -165,10 +165,13 @@ try {
A complete _**API reference**_ is available in the [wiki](https://github.com/rikyoz/bit7z/wiki/) section.

## Download

<div align="center">
<a href="https://github.com/rikyoz/bit7z/releases/latest">
<img alt="Github All Releases" src="https://img.shields.io/github/downloads/rikyoz/bit7z/total.svg?style=popout-square&label=downloads&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABk0lEQVR42uzQNwGAAAwEwPjDML0zsVLkgIkwcV8MXGRn3ea9bsvniy/btEVy/gEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANd9FPPylmcOiREFYRj8jpNj5iqx7WZs7GLbwj7zx2YLNRaqntRbZ+oiFLuxFUAodmnyv5I7ClUZfXmOl4HBPgZC9YqN3OQLzit4AUXYzUh+Ax9AEQ4ykN/FZ3DZUyQ1P0lY/gAPfBfhPDV5GrDkBuJHERS/SkWeFp/khN9Q+GBxKgHwH/KVfw5QEru8iQhlEQYoAWEwQkVE8mWwAEWojEC+AhahRWRVfPLmI9SEJk8DBg6hCLUBydfCB1yyBv/yrAE+EYq1e1zFbUEICMW7PMi3IiSk5tyhfAcChCJo+/K8BwFDEfotbtNLRABFGLYg34+YUFqMm5JXWowiQmgn67SB/XgziBiKMPsP+VkgfijC0h/k52EU/xHWfiG/hAShCNs/kF9DykjN939y1Cb1CCcfLOcPkBMvjz7RfeTIwFD/Ml3gkVsGJl3QH5M1zwAAAABJRU5ErkJggg==" height='24' style='border:0px;height:24px;'/>
</a>
<img alt="Github All Releases" src="https://img.shields.io/github/v/release/rikyoz/bit7z?label=Latest%20Release&logo=github&style=social" height='36' style='border:0px;height:36px;'/></a>
<br/>
<a href="https://github.com/rikyoz/bit7z/releases/latest">
<img alt="Github All Releases" src="https://img.shields.io/github/downloads/rikyoz/bit7z/total.svg?style=popout-square&label=total%20downloads&logo=icloud&logoColor=white"/></a>
</div>

Each released package contains a _precompiled version_ of the library (both in _debug_ and _release_ mode) and the _public API headers_ that are needed to use it in your program; packages are available for both _x86_ and _x64_ architectures.
Expand Down Expand Up @@ -206,19 +209,21 @@ Thank you! :)

## License (GPL v2)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
```markdown
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
```

<br/>
<div align="center">
Expand Down
12 changes: 6 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ version: 3.1.0-build{build}
skip_non_tags: true
clone_depth: 1

image:
image:
- Visual Studio 2015
- Visual Studio 2017
- Visual Studio 2019

build:
project: bit7z.vcxproj

matrix:
fast_finish: true

environment:
bit7z_version: 3.1.0-beta
bit7z_version: 3.1.0

matrix:
- name: msvc_x86 # MSVC x86
platform: x86
Expand All @@ -33,7 +33,7 @@ environment:
- name: msvc_mt_x64 # MSVC x64 MT
platform: x64
mt: TRUE

before_build:
- ps: Test-Path env:mt
- ps: if (Test-Path env:mt) {
Expand All @@ -60,7 +60,7 @@ after_build:
- echo %bit7z_version% %msvc_ver% > pkg\bit7z\BUILD.txt
- cd pkg
- 7z a -t7z bit7z-v%bit7z_version%-%msvc_ver%.7z *

artifacts:
- path: pkg\*.7z
name: binary
Expand Down
18 changes: 10 additions & 8 deletions bit7z.vcxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
Expand Down Expand Up @@ -53,11 +53,9 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{0ECEDD47-4EC9-3232-B099-20D54C597639}</ProjectGuid>
<RootNamespace>bit7z64</RootNamespace>
<Keyword>Qt4VSv1.0</Keyword>
<!--<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>-->
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
<PropertyGroup Condition="'$(VisualStudioVersion)' != '11.0' and '$(VisualStudioVersion)' != '12.0' and '$(WindowsTargetPlatformVersion)'==''">
<!-- Latest Target Version property -->
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
Expand Down Expand Up @@ -136,7 +134,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;lib\7zSDK\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' != '12.0'">-Zc:strictStrings -Zc:rvalueCast -Zc:inline -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' == '12.0'">-Zc:rvalueCast -Zc:inline %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>build\$(PlatformShortName)\debug\.obj\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
Expand Down Expand Up @@ -169,7 +168,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;lib\7zSDK\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' != '12.0'">-Zc:strictStrings -Zc:rvalueCast -Zc:inline -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' == '12.0'">-Zc:rvalueCast -Zc:inline %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>build\$(PlatformShortName)\release\.obj\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
Expand Down Expand Up @@ -203,7 +203,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;lib\7zSDK\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' != '12.0'">-Zc:strictStrings -Zc:rvalueCast -Zc:inline -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' == '12.0'">-Zc:rvalueCast -Zc:inline %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>build\$(PlatformShortName)\debug\.obj\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down Expand Up @@ -235,7 +236,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;lib\7zSDK\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' != '12.0'">-Zc:strictStrings -Zc:rvalueCast -Zc:inline -Zc:throwingNew -Zc:referenceBinding %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)' == '12.0'">-Zc:rvalueCast -Zc:inline %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>build\$(PlatformShortName)\debug\.obj\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down
2 changes: 1 addition & 1 deletion include/bitmemextractor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace bit7z {
* @param lib the 7z library used.
* @param format the input archive format.
*/
BitMemExtractor( const Bit7zLibrary& lib, const BitInFormat& format DEFAULT_FORMAT );
explicit BitMemExtractor( const Bit7zLibrary& lib, const BitInFormat& format DEFAULT_FORMAT );

/**
* @brief Extracts the given buffer archive into the choosen directory.
Expand Down
2 changes: 1 addition & 1 deletion include/bitpropvariant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <Propidl.h>

#if _MSC_VER <= 1700
#if _MSC_VER <= 1800
#define NOEXCEPT
#else
#define NOEXCEPT noexcept
Expand Down
2 changes: 1 addition & 1 deletion include/bitstreamextractor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace bit7z {
* @param lib the 7z library used.
* @param format the input archive format.
*/
BitStreamExtractor( const Bit7zLibrary& lib, const BitInFormat& format DEFAULT_FORMAT );
explicit BitStreamExtractor( const Bit7zLibrary& lib, const BitInFormat& format DEFAULT_FORMAT );

/**
* @brief Extracts the given stream archive into the choosen directory.
Expand Down
2 changes: 1 addition & 1 deletion include/callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "../include/bitarchivehandler.hpp"

#if ( _MSC_VER <= 1700 )
#if ( _MSC_VER <= 1800 )
#define CONSTEXPR const
#else
#define CONSTEXPR constexpr
Expand Down
2 changes: 1 addition & 1 deletion include/updatecallback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace bit7z {
bool mAskPassword;
bool mNeedBeClosed;

UpdateCallback( const BitArchiveCreator& creator );
explicit UpdateCallback( const BitArchiveCreator& creator );
};
}

Expand Down
1 change: 1 addition & 0 deletions src/bit7zlibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Bit7zLibrary::Bit7zLibrary( const std::wstring& dll_path ) : mLibrary( LoadLibra
mCreateObjectFunc = reinterpret_cast< CreateObjectFunc >( GetProcAddress( mLibrary, "CreateObject" ) );

if ( !mCreateObjectFunc ) {
FreeLibrary( mLibrary );
throw BitException( L"Cannot get CreateObject (error " + std::to_wstring( GetLastError() ) + L")", GetLastError() );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ namespace bit7z {
return _byteswap_uint64( signature );
}

#if ( _MSC_VER <= 1700 )
#if ( _MSC_VER <= 1800 )
#define CONSTEXPR const
#else
#define CONSTEXPR constexpr
Expand Down
6 changes: 2 additions & 4 deletions src/bitinputarchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ IInArchive* BitInputArchive::openArchiveStream( const BitArchiveHandler& handler
CMyComPtr< IInArchive > in_archive = initArchiveObject( handler.library(), &format_GUID );

// Creating open callback for the file
auto* open_callback_spec = new OpenCallback( handler, name );
CMyComPtr< IArchiveOpenCallback > open_callback( open_callback_spec );
CMyComPtr< IArchiveOpenCallback > open_callback = new OpenCallback( handler, name );

// Trying to open the file with the detected format
HRESULT res = in_archive->Open( in_stream, nullptr, open_callback );
Expand Down Expand Up @@ -121,8 +120,7 @@ BitInputArchive::BitInputArchive( const BitArchiveHandler& handler, const vector
}

BitInputArchive::BitInputArchive( const BitArchiveHandler& handler, std::istream& in_stream ) {
auto* std_stream_spec = new CStdInStream( in_stream );
CMyComPtr< IInStream > std_stream = std_stream_spec;
CMyComPtr< IInStream > std_stream = new CStdInStream( in_stream );
mDetectedFormat = &handler.format(); //if auto, detect format from content, otherwise try passed format
mInArchive = openArchiveStream( handler, L".", std_stream );
}
Expand Down
4 changes: 2 additions & 2 deletions src/bufferupdatecallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ using namespace bit7z;
* + FSItem class is used instead of CDirItem struct */

BufferUpdateCallback::BufferUpdateCallback( const BitArchiveCreator& creator,
const vector< byte_t >& in_buffer,
const wstring& in_buffer_name )
const vector< byte_t >& in_buffer,
const wstring& in_buffer_name )
: UpdateCallback( creator ),
mBuffer( in_buffer ),
mBufferName( in_buffer_name ) {}
Expand Down
2 changes: 1 addition & 1 deletion src/fileupdatecallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using namespace bit7z;
* + FSItem class is used instead of CDirItem struct */

FileUpdateCallback::FileUpdateCallback( const BitArchiveCreator& creator,
const vector< FSItem >& new_items )
const vector< FSItem >& new_items )
: UpdateCallback( creator ),
mNewItems( new_items ),
mVolSize( 0 ) {}
Expand Down
6 changes: 3 additions & 3 deletions src/updatecallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ HRESULT UpdateCallback::EnumProperties( IEnumSTATPROPSTG** /* enumerator */ ) {
}

HRESULT UpdateCallback::GetUpdateItemInfo( UInt32 index,
Int32* newData,
Int32* newProperties,
UInt32* indexInArchive ) {
Int32* newData,
Int32* newProperties,
UInt32* indexInArchive ) {

bool isOldItem = index < mOldArcItemsCount;

Expand Down

0 comments on commit c15f985

Please sign in to comment.