@@ -115,7 +115,7 @@ namespace propertybag
115
115
}
116
116
break ;
117
117
case PT_BINARY:
118
- m_prop.Value .bin .cb = m_binVal.size ();
118
+ m_prop.Value .bin .cb = static_cast <ULONG>( m_binVal.size () );
119
119
m_prop.Value .bin .lpb = const_cast <LPBYTE>(m_binVal.data ());
120
120
break ;
121
121
case PT_UNICODE:
@@ -127,7 +127,7 @@ namespace propertybag
127
127
case PT_MV_LONG:
128
128
{
129
129
const auto parser = std::make_shared<smartview::binaryParser>(m_binVal);
130
- const auto count = parser->getSize () / sizeof (LONG);
130
+ const auto count = static_cast <ULONG>( parser->getSize () / sizeof (LONG) );
131
131
m_bin = std::vector<BYTE>(sizeof (LONG) * count);
132
132
m_prop.Value .MVl .lpl = reinterpret_cast <LONG*>(m_bin.data ());
133
133
m_prop.Value .MVl .cValues = count;
@@ -209,7 +209,7 @@ namespace propertybag
209
209
default :
210
210
// Haven't found any other property types out there so this ought never be used
211
211
m_prop.ulPropTag = PROP_TAG (PT_BINARY, PROP_ID (m_ulPropTag));
212
- m_prop.Value .bin .cb = m_binVal.size ();
212
+ m_prop.Value .bin .cb = static_cast <ULONG>( m_binVal.size () );
213
213
m_prop.Value .bin .lpb = const_cast <LPBYTE>(m_binVal.data ());
214
214
m_canParseMAPI = false ;
215
215
break ;
@@ -218,7 +218,7 @@ namespace propertybag
218
218
else
219
219
{
220
220
m_prop.ulPropTag = PROP_TAG (PT_BINARY, PROP_ID_NULL);
221
- m_prop.Value .bin .cb = m_binVal.size ();
221
+ m_prop.Value .bin .cb = static_cast <ULONG>( m_binVal.size () );
222
222
m_prop.Value .bin .lpb = const_cast <LPBYTE>(m_binVal.data ());
223
223
}
224
224
}
@@ -368,7 +368,7 @@ namespace propertybag
368
368
break ;
369
369
case PT_UNICODE:
370
370
// Include null terminator
371
- cb = ( std::wstring (newValue->Value .lpszW ).length () + 1 ) * sizeof (wchar_t );
371
+ cb = static_cast <ULONG>(( std::wstring (newValue->Value .lpszW ).length () + 1 ) * sizeof (wchar_t ) );
372
372
lpb = LPBYTE (newValue->Value .lpszW );
373
373
break ;
374
374
case PT_MV_LONG:
@@ -394,7 +394,7 @@ namespace propertybag
394
394
// Count up our additional needs for reserve
395
395
for (ULONG iMVCount = 0 ; iMVCount < newValue->Value .MVbin .cValues ; iMVCount++)
396
396
{
397
- cb += memory::align (newValue->Value .MVbin .lpbin [iMVCount].cb );
397
+ cb += static_cast <ULONG>( memory::align (newValue->Value .MVbin .lpbin [iMVCount].cb ) );
398
398
}
399
399
400
400
// Then reserve additional space for the binary data to avoid realloc
@@ -433,7 +433,7 @@ namespace propertybag
433
433
for (ULONG iMVCount = 0 ; iMVCount < newValue->Value .MVszW .cValues ; iMVCount++)
434
434
{
435
435
strings[iMVCount] = newValue->Value .MVszW .lppszW [iMVCount]; // cache for convenience
436
- cb += ( strings[iMVCount].length () + 1 ) * sizeof (wchar_t );
436
+ cb += static_cast <ULONG>(( strings[iMVCount].length () + 1 ) * sizeof (wchar_t ) );
437
437
}
438
438
439
439
// Then reserve additional space for the string data to avoid realloc
@@ -465,7 +465,7 @@ namespace propertybag
465
465
for (ULONG iMVCount = 0 ; iMVCount < newValue->Value .MVszA .cValues ; iMVCount++)
466
466
{
467
467
strings[iMVCount] = newValue->Value .MVszA .lppszA [iMVCount]; // cache for convenience
468
- cb += strings[iMVCount].length () + 1 ;
468
+ cb += static_cast <ULONG>( strings[iMVCount].length () ) + 1 ;
469
469
}
470
470
471
471
// Then reserve additional space for the string data to avoid realloc
0 commit comments