forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-17 557c24d082b6ecb9bfe5407b77ae43fa7650a5dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 0820ef4b9238c1e39ae5bda32cc08cce3fd3ce89 Mon Sep 17 00:00:00 2001
From: Nisha Parrakat <Nisha.Parrakat@kpit.com>
Date: Wed, 26 May 2021 19:59:28 +0000
Subject: [PATCH] fixes the below error
 
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
|   308 |           numMethods++;
|       |           ^~~~~~~~~~
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
|   318 |         numMethods++;
 
use unsigned instead of bool
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
 
Upstream-Status: Pending
 
---
 CPP/7zip/Archive/Wim/WimHandler.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/CPP/7zip/Archive/Wim/WimHandler.cpp b/CPP/7zip/Archive/Wim/WimHandler.cpp
index 27d3298..4ff5cfe 100644
--- a/CPP/7zip/Archive/Wim/WimHandler.cpp
+++ b/CPP/7zip/Archive/Wim/WimHandler.cpp
@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
 
       AString res;
 
-      bool numMethods = 0;
+      unsigned numMethods = 0;
       for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)
       {
         if (methodMask & ((UInt32)1 << i))