Use ndn::Buffer::data() instead of buf()
The latter is considered deprecated. Change-Id: If92406ccedca391e3551b456491ebb47737f1bc1
This commit is contained in:
1 parent
12d5faa1f8
commit
5473abe82c
5 files changed
+7
-9
No files matched your search
@@ -46,7 +46,7 @@ struct DigestPtrHash
|
||||
{
|
||||
BOOST_ASSERT(digest->size() > sizeof(std::size_t));
|
||||
|
||||
return *reinterpret_cast<const std::size_t*>(digest->buf());
|
||||
return *reinterpret_cast<const std::size_t*>(digest->data());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ struct SessionNameHash
|
||||
|
||||
BOOST_ASSERT(buffer->size() > sizeof(std::size_t));
|
||||
|
||||
return *reinterpret_cast<const std::size_t*>(buffer->buf());
|
||||
return *reinterpret_cast<const std::size_t*>(buffer->data());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -252,7 +252,7 @@ Logic::updateSeqNo(const SeqNo& seqNo, const Name& updatePrefix)
|
||||
_LOG_DEBUG_ID("updateSeqNo: not in Reset ");
|
||||
ConstBufferPtr previousRoot = m_state.getRootDigest();
|
||||
{
|
||||
std::string hash = ndn::toHex(previousRoot->buf(), previousRoot->size(), false);
|
||||
std::string hash = ndn::toHex(previousRoot->data(), previousRoot->size(), false);
|
||||
_LOG_DEBUG_ID("Hash: " << hash);
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ Logic::cancelReset()
|
||||
void
|
||||
Logic::printDigest(ConstBufferPtr digest)
|
||||
{
|
||||
std::string hash = ndn::toHex(digest->buf(), digest->size(), false);
|
||||
std::string hash = ndn::toHex(digest->data(), digest->size(), false);
|
||||
_LOG_DEBUG_ID("Hash: " << hash);
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -26,9 +26,7 @@
|
||||
|
||||
namespace chronosync {
|
||||
|
||||
State::~State()
|
||||
{
|
||||
}
|
||||
State::~State() = default;
|
||||
|
||||
/**
|
||||
* @brief Add or update leaf to the sync tree
|
||||
@@ -68,7 +66,7 @@ State::getRootDigest() const
|
||||
BOOST_FOREACH (ConstLeafPtr leaf, m_leaves.get<ordered>())
|
||||
{
|
||||
BOOST_ASSERT(leaf != 0);
|
||||
m_digest.update(leaf->getDigest()->buf(), leaf->getDigest()->size());
|
||||
m_digest.update(leaf->getDigest()->data(), leaf->getDigest()->size());
|
||||
}
|
||||
|
||||
return m_digest.computeDigest();
|
||||
|
||||
@@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE(LeafDigest)
|
||||
BOOST_CHECK_NO_THROW(leaf.getDigest());
|
||||
|
||||
ndn::ConstBufferPtr digest = leaf.getDigest();
|
||||
BOOST_CHECK_EQUAL(result, ndn::toHex(digest->buf(), digest->size(), false));
|
||||
BOOST_CHECK_EQUAL(result, ndn::toHex(digest->data(), digest->size(), false));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Container)
|
||||
|
||||
Reference in new issue
Block a user