OSDN Git Service

Cppcheck: Variable 'm_oldPackingInfo' is assigned in constructor body. Consider perfo...
authorsdottaka <sdottaka@users.sourceforge.net>
Tue, 17 Feb 2015 06:39:35 +0000 (15:39 +0900)
committersdottaka <sdottaka@users.sourceforge.net>
Tue, 17 Feb 2015 06:39:35 +0000 (15:39 +0900)
--HG--
branch : stable

Src/Merge7zFormatMergePluginImpl.h

index a55300b..c8f5a36 100644 (file)
@@ -41,9 +41,8 @@ struct Merge7zFormatMergePluginImpl : public Merge7z::Format
 
 struct Merge7zFormatMergePluginScope
 {
-       Merge7zFormatMergePluginScope(const PackingInfo *infoUnpacker)
+       Merge7zFormatMergePluginScope(const PackingInfo *infoUnpacker) : m_oldPackingInfo(*Merge7zFormatMergePluginImpl::GetPackingInfo())
        {
-               m_oldPackingInfo = *Merge7zFormatMergePluginImpl::GetPackingInfo();
                Merge7zFormatMergePluginImpl::SetPackingInfo(infoUnpacker);
        }
        ~Merge7zFormatMergePluginScope()