docs: update code-style rule 2.24
This commit also updates existing code to use the new format.
refs #4681
Change-Id: I88e62a34fc55a69cd01d74e80a7000c6cf4d7c2d
diff --git a/src/lp/cache-policy.hpp b/src/lp/cache-policy.hpp
index f35dc06..f772101 100644
--- a/src/lp/cache-policy.hpp
+++ b/src/lp/cache-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -50,11 +50,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
CachePolicy();
diff --git a/src/lp/packet.hpp b/src/lp/packet.hpp
index 1aba8b1..872af58 100644
--- a/src/lp/packet.hpp
+++ b/src/lp/packet.hpp
@@ -33,11 +33,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
Packet();
diff --git a/src/lp/prefix-announcement.hpp b/src/lp/prefix-announcement.hpp
index 135cc21..ef2b447 100644
--- a/src/lp/prefix-announcement.hpp
+++ b/src/lp/prefix-announcement.hpp
@@ -43,11 +43,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
PrefixAnnouncement();