Remove use of deprecated code
Change-Id: I721e9d0f9b41e7a53d75b1fde4a718c349273eeb
Refs: #3988
diff --git a/tools/ndngetfile.cpp b/tools/ndngetfile.cpp
index 99f54ca..1f59a36 100644
--- a/tools/ndngetfile.cpp
+++ b/tools/ndngetfile.cpp
@@ -1,6 +1,6 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
*
* This file is part of NDN repo-ng (Next generation of NDN repository).
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -55,6 +55,7 @@
bind(&Consumer::onVersionedData, this, _1, _2)
:
bind(&Consumer::onUnversionedData, this, _1, _2),
+ bind(&Consumer::onTimeout, this, _1), // Nack
bind(&Consumer::onTimeout, this, _1));
}
@@ -72,7 +73,7 @@
}
void
-Consumer::onVersionedData(const Interest& interest, Data& data)
+Consumer::onVersionedData(const Interest& interest, const Data& data)
{
const Name& name = data.getName();
@@ -110,7 +111,7 @@
}
void
-Consumer::onUnversionedData(const Interest& interest, Data& data)
+Consumer::onUnversionedData(const Interest& interest, const Data& data)
{
const Name& name = data.getName();
//std::cout<<"recevied data name = "<<name<<std::endl;
@@ -248,7 +249,7 @@
{
interestLifetime = boost::lexical_cast<int>(optarg);
}
- catch (boost::bad_lexical_cast&)
+ catch (const boost::bad_lexical_cast&)
{
std::cerr << "ERROR: -l option should be an integer." << std::endl;
return 1;
@@ -260,7 +261,7 @@
{
timeout = boost::lexical_cast<int>(optarg);
}
- catch (boost::bad_lexical_cast&)
+ catch (const boost::bad_lexical_cast&)
{
std::cerr << "ERROR: -w option should be an integer." << std::endl;
return 1;