docs: Documentation updates
Change-Id: I7e10ba6bd1f70e779d5c2fc0437ff0f15828b312
Refs: #1923
diff --git a/src/main.cpp b/src/main.cpp
index 3d287a0..752843a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -27,12 +27,12 @@
#include "logger.hpp"
#include "version.hpp"
-using namespace nlsr;
+namespace nlsr {
-int32_t
+int
main(int32_t argc, char** argv)
{
- nlsr::Nlsr nlsr;
+ Nlsr nlsr;
std::string programName(argv[0]);
nlsr.setConfFileName("nlsr.conf");
int32_t opt;
@@ -56,7 +56,7 @@
}
}
ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
- if(!cfp.processConfFile()) {
+ if (!cfp.processConfFile()) {
std::cerr << "Error in configuration file processing! Exiting from NLSR" << std::endl;
return EXIT_FAILURE;
}
@@ -76,3 +76,11 @@
}
return EXIT_SUCCESS;
}
+
+} // namespace nlsr
+
+int
+main(int32_t argc, char** argv)
+{
+ return nlsr::main(argc, argv);
+}
diff --git a/src/utility/name-helper.hpp b/src/utility/name-helper.hpp
index c2872e5..60a58b4 100644
--- a/src/utility/name-helper.hpp
+++ b/src/utility/name-helper.hpp
@@ -32,14 +32,14 @@
namespace nlsr {
namespace util {
+
/**
* @brief search a name component in ndn::Name and return the position of the component
- * @param name where to search the searchString
- * @param searchString, the string to search in name
- * @retrun int32_t -1 if searchString not found else return the position
+ * @param name where to search the searchString
+ * @param searchString the string to search in name
+ * @return -1 if searchString not found else return the position
* starting from 0
*/
-
inline static int32_t
getNameComponentPosition(const ndn::Name& name, const std::string& searchString)
{