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.hpp b/src/file-manifest.hpp
index 0a46574..6ce957e 100644
--- a/src/file-manifest.hpp
+++ b/src/file-manifest.hpp
@@ -144,9 +144,15 @@
* @param wire the write to be decoded
* @throws Error if decoding fails
*/
- const Block&
- wireEncode();
- /// Encodes this FileManifest into the wire format and returns a Block with the contents
+
+ void
+ finalize();
+ /*
+ * \brief Performs all final processing on this manifest
+ *
+ * This method should be called once this manifest is populated and *must* be called before
+ * signing it or calling wireEncode().
+ */
private:
void
@@ -204,6 +210,11 @@
inline
FileManifest::FileManifest(const Block& block)
+: Data()
+, m_dataPacketSize(0)
+, m_catalogPrefix("")
+, m_catalog()
+, m_submanifestPtr(nullptr)
{
wireDecode(block);
}