diff options
Diffstat (limited to 'vhdlparser/vhdlstring.h')
-rwxr-xr-x | vhdlparser/vhdlstring.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vhdlparser/vhdlstring.h b/vhdlparser/vhdlstring.h index ee01b06..59e9e22 100755 --- a/vhdlparser/vhdlstring.h +++ b/vhdlparser/vhdlstring.h @@ -58,7 +58,7 @@ class VhdlString } VhdlString(const char *s) { - m_len = strlen(s); + m_len = (int)strlen(s); m_str=(char*)malloc(m_len+1); memcpy(m_str,s,m_len+1); } @@ -87,7 +87,7 @@ class VhdlString } VhdlString& append(const char *s) { - return append(s,strlen(s)); + return append(s,(int)strlen(s)); } VhdlString& append(const VhdlString &other) { @@ -123,9 +123,6 @@ class VhdlString int m_len; }; -// declare it static otherwise we will get: -// multiple definition of `operator+(char const*, VhdlString)' -// as we are in an include file -static VhdlString operator+ (const char *s, VhdlString v) { return VhdlString(s).append(v); } +inline VhdlString operator+ (const char *s, VhdlString v) { return VhdlString(s).append(v); } #endif |