changeset 524:9e241cef32a4 dev

fix warning
author amazy
date Tue, 12 Mar 2019 18:28:25 +0100
parents aa00a49444c6
children 548eed46f535
files Resources/CodeGeneration/template.in.h.j2
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CodeGeneration/template.in.h.j2	Tue Mar 12 15:02:05 2019 +0100
+++ b/Resources/CodeGeneration/template.in.h.j2	Tue Mar 12 18:28:25 2019 +0100
@@ -86,7 +86,7 @@
     return result;
   }
 
-  inline std::string MakeIndent(int indent)
+  inline std::string MakeIndent(size_t indent)
   {
     char* txt = reinterpret_cast<char*>(malloc(indent+1)); // NO EXCEPTION BELOW!!!!!!!!!!!!
     for(size_t i = 0; i < indent; ++i)
@@ -99,14 +99,14 @@
 
   // generic dumper
   template<typename T>
-  std::ostream& StoneDumpValue(std::ostream& out, const T& value, int indent)
+  std::ostream& StoneDumpValue(std::ostream& out, const T& value, size_t indent)
   {
     out << MakeIndent(indent) << value;
     return out;
   }
 
   // string dumper
-  inline std::ostream& StoneDumpValue(std::ostream& out, const std::string& value, int indent)
+  inline std::ostream& StoneDumpValue(std::ostream& out, const std::string& value, size_t indent)
   {
     out << MakeIndent(indent) << "\"" << value  << "\"";
     return out;
@@ -148,7 +148,7 @@
   }
 
   template<typename T>
-  std::ostream& StoneDumpValue(std::ostream& out, const std::map<std::string,T>& value, int indent)
+  std::ostream& StoneDumpValue(std::ostream& out, const std::map<std::string,T>& value, size_t indent)
   {
     out << MakeIndent(indent) << "{\n";
     for (typename std::map<std::string, T>::const_iterator it = value.cbegin();
@@ -188,7 +188,7 @@
   }
 
   template<typename T>
-  std::ostream& StoneDumpValue(std::ostream& out, const std::vector<T>& value, int indent)
+  std::ostream& StoneDumpValue(std::ostream& out, const std::vector<T>& value, size_t indent)
   {
     out << MakeIndent(indent) << "[\n";
     for (size_t i = 0; i < value.size(); ++i)
@@ -273,7 +273,7 @@
     return Json::Value(strValue);
   }
 
-  inline std::ostream& StoneDumpValue(std::ostream& out, const {{enum['name']}}& value, int indent = 0)
+  inline std::ostream& StoneDumpValue(std::ostream& out, const {{enum['name']}}& value, size_t indent = 0)
   {
 {% for key in enum['fields']%}    if( value == {{enum['name']}}_{{key}})
     {
@@ -311,7 +311,7 @@
     return result;
   }
 
-  inline std::ostream& StoneDumpValue(std::ostream& out, const {{struct['name']}}& value, int indent = 0)
+  inline std::ostream& StoneDumpValue(std::ostream& out, const {{struct['name']}}& value, size_t indent = 0)
   {
     out << MakeIndent(indent) << "{\n";
 {% if struct %}{% if struct['fields'] %}{% for key in struct['fields']%}    out << MakeIndent(indent) << "{{key}}:\n";