From a1b64080d1525a7a65e53f33d1a3fd257957e732 Mon Sep 17 00:00:00 2001
From: Gabriele Contini <contini.mailing@gmail.com>
Date: 周日, 15 3月 2020 11:00:39 +0800
Subject: [PATCH] fix compilation errors

---
 src/library/base/StringUtils.h |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/library/base/StringUtils.h b/src/library/base/StringUtils.h
index 8134349..02a679d 100644
--- a/src/library/base/StringUtils.h
+++ b/src/library/base/StringUtils.h
@@ -12,7 +12,6 @@
 #include <vector>
 
 namespace license {
-using namespace std;
 
 /**
  * Eliminate whitespace from both sides of a string and returns a copy
@@ -20,23 +19,25 @@
  * @param string_to_trim
  * @return the trimmed string
  */
-string trim_copy(const string& string_to_trim);
+std::string trim_copy(const std::string& string_to_trim);
 
-string toupper_copy(const string& lowercase);
+std::string toupper_copy(const std::string& lowercase);
 
-time_t seconds_from_epoch(const char* s);
+time_t seconds_from_epoch(const std::string& timeString);
 
 /**
  * Split a string on a given character
  */
-const vector<string> split_string(const string& stringToBeSplit, const char splitchar);
+const std::vector<std::string> split_string(const std::string& stringToBeSplit, const char splitchar);
+
+// strnln_s is not well supported and strlen is marked unsafe..
+size_t mstrnlen_s(const char* szptr, size_t maxsize);
 
 typedef enum {
 	INI, BASE64, UNKNOWN
 } FILE_FORMAT;
 
-FILE_FORMAT identify_format(const string& license);
-
+FILE_FORMAT identify_format(const std::string& license);
 }
 
 /* namespace license */

--
Gitblit v1.9.1