table: enforce NameTree max depth universally

refs #4262

Change-Id: Ia9b04a89c12cd09aa244201b513cc1808c0c473f
This commit is contained in:
Junxiao Shi committed 2018-03-20 17:14:18 +00:00
1 parent 7003e0bc66
commit 057d149fda
9 files changed
+130 -113

No files matched your search

+4 -2
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2016, Regents of the University of California,
/*
* Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,6 +24,7 @@
*/
#include "name-tree-entry.hpp"
#include "name-tree.hpp"
namespace nfd {
namespace name_tree {
@@ -34,6 +35,7 @@ Entry::Entry(const Name& name, Node* node)
, m_parent(nullptr)
{
BOOST_ASSERT(node != nullptr);
BOOST_ASSERT(name.size() <= NameTree::getMaxDepth());
}
void