Bug-fix: wireEncode "corrupts" implicit digest
* Removed wireEncde()
* Implemented finalize()
* Minor change to constructor to resolve code quality warnings (-Weffc++)

Refs: #3490

Change-Id: Ic943e12b0fd2d24dbfe46e7f5824051d308fb0ec
diff --git a/src/file-manifest.cpp b/src/file-manifest.cpp
index 7352699..fe4fec8 100644
--- a/src/file-manifest.cpp
+++ b/src/file-manifest.cpp
@@ -42,13 +42,6 @@
   this->decodeContent();
 }
 
-const Block&
-FileManifest::wireEncode()
-{
-  encodeContent();
-  return Data::wireEncode();
-}
-
 template<ndn::encoding::Tag TAG>
 size_t
 FileManifest::encodeContent(ndn::EncodingImpl<TAG>& encoder) const {
@@ -126,6 +119,12 @@
   return true;
 }
 
+void
+FileManifest::finalize() {
+  m_catalog.shrink_to_fit();
+  encodeContent();
+}
+
 void FileManifest::encodeContent() {
   // Name
   //     <file_name>/ImplicitDigest