chunks: drop pointless init of virtual base from abstract class
Change-Id: I8d47dc5bdcb1d12f808d729d71a2bbdc0b87daf4
diff --git a/tools/chunks/catchunks/discover-version-fixed.cpp b/tools/chunks/catchunks/discover-version-fixed.cpp
index 6b763de..5d434f0 100644
--- a/tools/chunks/catchunks/discover-version-fixed.cpp
+++ b/tools/chunks/catchunks/discover-version-fixed.cpp
@@ -1,8 +1,8 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016, Regents of the University of California,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -25,16 +25,12 @@
#include "discover-version-fixed.hpp"
-#include <cmath>
-#include <boost/lexical_cast.hpp>
-
namespace ndn {
namespace chunks {
DiscoverVersionFixed::DiscoverVersionFixed(const Name& prefix, Face& face, const Options& options)
: Options(options)
- , DiscoverVersion(prefix, face, options)
- , m_strayExcludes()
+ , DiscoverVersion(prefix, face)
{
}
diff --git a/tools/chunks/catchunks/discover-version-fixed.hpp b/tools/chunks/catchunks/discover-version-fixed.hpp
index 9925707..2514098 100644
--- a/tools/chunks/catchunks/discover-version-fixed.hpp
+++ b/tools/chunks/catchunks/discover-version-fixed.hpp
@@ -1,8 +1,8 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016, Regents of the University of California,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -46,10 +46,9 @@
*/
class DiscoverVersionFixed : public DiscoverVersion
{
-
public:
/**
- * @brief create a DiscoverVersionSpecified service
+ * @brief create a DiscoverVersionFixed service
*/
DiscoverVersionFixed(const Name& prefix, Face& face, const Options& options);
diff --git a/tools/chunks/catchunks/discover-version-iterative.cpp b/tools/chunks/catchunks/discover-version-iterative.cpp
index 9d38cfe..fddf08e 100644
--- a/tools/chunks/catchunks/discover-version-iterative.cpp
+++ b/tools/chunks/catchunks/discover-version-iterative.cpp
@@ -1,8 +1,8 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2017, Regents of the University of California,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University.
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -34,10 +34,9 @@
DiscoverVersionIterative::DiscoverVersionIterative(const Name& prefix, Face& face,
const Options& options)
: chunks::Options(options)
- , DiscoverVersion(prefix, face, options)
+ , DiscoverVersion(prefix, face)
, Options(options)
, m_latestVersion(0)
- , m_latestVersionData(nullptr)
, m_foundVersion(false)
{
}
diff --git a/tools/chunks/catchunks/discover-version-iterative.hpp b/tools/chunks/catchunks/discover-version-iterative.hpp
index 59652a6..e76ff17 100644
--- a/tools/chunks/catchunks/discover-version-iterative.hpp
+++ b/tools/chunks/catchunks/discover-version-iterative.hpp
@@ -1,8 +1,8 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2017, Regents of the University of California,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University.
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -43,16 +43,14 @@
{
public:
explicit
- DiscoverVersionIterativeOptions(const Options& opt = Options())
- : Options(opt)
- , maxRetriesAfterVersionFound(0)
- , discoveryTimeout(time::milliseconds(300))
+ DiscoverVersionIterativeOptions(const Options& opts = Options())
+ : Options(opts)
{
}
public:
- int maxRetriesAfterVersionFound; // how many times to retry after a discoveryTimeout
- time::milliseconds discoveryTimeout; // timeout for version discovery
+ int maxRetriesAfterVersionFound{0}; ///< how many times to retry after a discoveryTimeout
+ time::milliseconds discoveryTimeout{300}; ///< timeout for version discovery
};
/**
diff --git a/tools/chunks/catchunks/discover-version.cpp b/tools/chunks/catchunks/discover-version.cpp
index 455fd6a..78b7c41 100644
--- a/tools/chunks/catchunks/discover-version.cpp
+++ b/tools/chunks/catchunks/discover-version.cpp
@@ -31,9 +31,8 @@
namespace ndn {
namespace chunks {
-DiscoverVersion::DiscoverVersion(const Name& prefix, Face& face, const Options& options)
- : Options(options)
- , m_prefix(prefix)
+DiscoverVersion::DiscoverVersion(const Name& prefix, Face& face)
+ : m_prefix(prefix)
, m_face(face)
{
}
diff --git a/tools/chunks/catchunks/discover-version.hpp b/tools/chunks/catchunks/discover-version.hpp
index c34ff5e..464b28e 100644
--- a/tools/chunks/catchunks/discover-version.hpp
+++ b/tools/chunks/catchunks/discover-version.hpp
@@ -62,7 +62,7 @@
/**
* @brief create a DiscoverVersion service
*/
- DiscoverVersion(const Name& prefix, Face& face, const Options& options);
+ DiscoverVersion(const Name& prefix, Face& face);
virtual
~DiscoverVersion();