diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-04 20:23:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-04 20:25:28 +0300 |
commit | 32d60b8e9492f6bbaaa00cc36632a8d195c9a1a3 (patch) | |
tree | 46eec81afffe01b4e283186fe795ca4ae862dd53 | |
parent | 423151d3c791f4e77d74385abf6ec0b657be0c56 (diff) |
warning fixes
-rw-r--r-- | include/m_string.inl | 12 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/m_string.inl b/include/m_string.inl index 97b94040b9..d31236e512 100644 --- a/include/m_string.inl +++ b/include/m_string.inl @@ -218,7 +218,7 @@ void CMSimpleStringT<BaseType>::UnlockBuffer() }
template<typename BaseType>
-void CMSimpleStringT<BaseType>::ReleaseBuffer(int nNewLength = -1)
+void CMSimpleStringT<BaseType>::ReleaseBuffer(int nNewLength)
{
if (nNewLength == -1) {
int nAlloc = GetData()->nAllocLength;
@@ -503,7 +503,7 @@ CMStringT<BaseType, StringTraits>::CMStringT(const unsigned char* pszSrc) : }
template< typename BaseType, class StringTraits >
-CMStringT<BaseType, StringTraits>::CMStringT(char ch, int nLength = 1) :
+CMStringT<BaseType, StringTraits>::CMStringT(char ch, int nLength) :
CThisSimpleString()
{
if (nLength > 0) {
@@ -514,7 +514,7 @@ CMStringT<BaseType, StringTraits>::CMStringT(char ch, int nLength = 1) : }
template< typename BaseType, class StringTraits >
-CMStringT<BaseType, StringTraits>::CMStringT(wchar_t ch, int nLength = 1) :
+CMStringT<BaseType, StringTraits>::CMStringT(wchar_t ch, int nLength) :
CThisSimpleString()
{
if (nLength > 0) {
@@ -698,7 +698,7 @@ int CMStringT<BaseType, StringTraits>::CollateNoCase(PCXSTR psz) const // Delete 'nCount' characters, starting at index 'iIndex'
template< typename BaseType, class StringTraits >
-int CMStringT<BaseType, StringTraits>::Delete(int iIndex, int nCount = 1)
+int CMStringT<BaseType, StringTraits>::Delete(int iIndex, int nCount)
{
if (iIndex < 0)
iIndex = 0;
@@ -946,7 +946,7 @@ CMStringT<BaseType, StringTraits> CMStringT<BaseType, StringTraits>::Tokenize(PC // Find the first occurrence of character 'ch', starting at index 'iStart'
template< typename BaseType, class StringTraits >
-int CMStringT<BaseType, StringTraits>::Find(XCHAR ch, int iStart = 0) const
+int CMStringT<BaseType, StringTraits>::Find(XCHAR ch, int iStart) const
{
// nLength is in XCHARs
int nLength = this->GetLength();
@@ -964,7 +964,7 @@ int CMStringT<BaseType, StringTraits>::Find(XCHAR ch, int iStart = 0) const // Find the first occurrence of string 'pszSub', starting at index 'iStart'
template< typename BaseType, class StringTraits >
-int CMStringT<BaseType, StringTraits>::Find(PCXSTR pszSub, int iStart = 0) const
+int CMStringT<BaseType, StringTraits>::Find(PCXSTR pszSub, int iStart) const
{
// iStart is in XCHARs
if (pszSub == nullptr)
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index e5c76b7811..6fc14f60e7 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1342,7 +1342,7 @@ bool CMraProto::GetPassDB(CMStringA &res) SHA1GetDigest(pDecoded, dwDecodedSize, btRandomData);
if (0 != memcmp(&btCryptedPass[1], btRandomData, MIR_SHA1_HASH_SIZE))
return false;
- res = CMStringA((LPSTR)(PBYTE)pDecoded, dwDecodedSize);
+ res = CMStringA((LPSTR)(PBYTE)pDecoded, (int)dwDecodedSize);
}
else return false;
}
|