Daniele Bartolini 9 سال پیش
والد
کامیت
7ef0b584b3
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 4 4
      src/core/guid.cpp
  2. 2 2
      src/core/guid.h

+ 4 - 4
src/core/guid.cpp

@@ -56,10 +56,10 @@ namespace guid
 		return num == 6;
 	}
 
-	void to_string(const Guid& guid, DynamicString& s)
+	void to_string(const Guid& guid, DynamicString& str)
 	{
-		char str[36+1];
-		snprintf(str, sizeof(str), "%.8x-%.4x-%.4x-%.4x-%.4x%.8x"
+		char buf[36+1];
+		snprintf(buf, sizeof(buf), "%.8x-%.4x-%.4x-%.4x-%.4x%.8x"
 			, guid.data1
 			, guid.data2
 			, guid.data3
@@ -67,7 +67,7 @@ namespace guid
 			, (u16)((guid.data4 & 0x0000ffff00000000u) >> 32)
 			, (u32)((guid.data4 & 0x00000000ffffffffu) >>  0)
 			);
-		s.set(str, sizeof(str)-1);
+		str.set(buf, sizeof(buf)-1);
 	}
 }
 

+ 2 - 2
src/core/guid.h

@@ -33,8 +33,8 @@ namespace guid
 	/// Parses the @a guid from @a str and returns true if success.
 	bool try_parse(const char* str, Guid& guid);
 
-	/// Fills @a s with the string representation of the @a guid.
-	void to_string(const Guid& guid, DynamicString& s);
+	/// Fills @a str with the string representation of the @a guid.
+	void to_string(const Guid& guid, DynamicString& str);
 }
 
 /// Returns whether Guid @a and @b are equal.