Imported Upstream version 17.23.5
[platform/upstream/libzypp.git] / zypp / base / InputStream.cc
index 2aeeb73..02461cd 100644 (file)
  *
 */
 #include <iostream>
-#include "zypp/base/LogTools.h"
+#include <zypp/base/LogTools.h>
 
-#include "zypp/base/InputStream.h"
-#include "zypp/base/GzStream.h"
+#include <zypp/base/InputStream.h>
+#include <zypp/base/GzStream.h>
 
 #ifdef ENABLE_ZCHUNK_COMPRESSION
-  #include "zypp/base/ZckStream.h"
+  #include <zypp/base/ZckStream.h>
 #endif
 
-#include "zypp/PathInfo.h"
+#include <zypp/PathInfo.h>
 
 using std::endl;
 
@@ -41,10 +41,8 @@ namespace zypp
 
     inline shared_ptr<std::istream> streamForFile ( const Pathname & file_r )
     {
-      const auto zType = filesystem::zipType( file_r );
-
 #ifdef ENABLE_ZCHUNK_COMPRESSION
-      if ( zType == filesystem::ZT_ZCHNK )
+      if ( const auto zType = filesystem::zipType( file_r ); zType == filesystem::ZT_ZCHNK )
         return shared_ptr<std::istream>( new ifzckstream( file_r.asString().c_str() ) );
 #endif