@@ -133,8 +133,8 @@ namespace Concurrency { namespace streams {
133
133
// seek beyond the current size.
134
134
_ASSERTE (m_current_position <= m_size);
135
135
136
- SafeSize readhead (m_current_position);
137
- SafeSize writeend (m_size);
136
+ msl::safeint3::SafeInt< size_t > readhead (m_current_position);
137
+ msl::safeint3::SafeInt< size_t > writeend (m_size);
138
138
return (size_t )(writeend - readhead);
139
139
}
140
140
@@ -178,7 +178,7 @@ namespace Concurrency { namespace streams {
178
178
179
179
virtual pplx::task<size_t > _putn (const _CharType *ptr, size_t count)
180
180
{
181
- SafeSize newSize = SafeSize (count) + m_current_position;
181
+ msl::safeint3::SafeInt< size_t > newSize = msl::safeint3::SafeInt< size_t > (count) + m_current_position;
182
182
if ( newSize > m_size )
183
183
return pplx::task_from_exception<size_t >(std::make_exception_ptr (std::runtime_error (" Writing past the end of the buffer" )));
184
184
return pplx::task_from_result<size_t >(this ->write (ptr, count));
@@ -193,8 +193,8 @@ namespace Concurrency { namespace streams {
193
193
{
194
194
if (!this ->can_write ()) return nullptr ;
195
195
196
- SafeSize readhead (m_current_position);
197
- SafeSize writeend (m_size);
196
+ msl::safeint3::SafeInt< size_t > readhead (m_current_position);
197
+ msl::safeint3::SafeInt< size_t > writeend (m_size);
198
198
size_t space_left = (size_t )(writeend - readhead);
199
199
200
200
if (space_left < count) return nullptr ;
@@ -476,8 +476,8 @@ namespace Concurrency { namespace streams {
476
476
if (!can_satisfy (count))
477
477
return 0 ;
478
478
479
- SafeSize request_size (count);
480
- SafeSize read_size = request_size.Min (in_avail ());
479
+ msl::safeint3::SafeInt< size_t > request_size (count);
480
+ msl::safeint3::SafeInt< size_t > read_size = request_size.Min (in_avail ());
481
481
482
482
size_t newPos = m_current_position + read_size;
483
483
@@ -506,7 +506,7 @@ namespace Concurrency { namespace streams {
506
506
{
507
507
if (!this ->can_write () || (count == 0 )) return 0 ;
508
508
509
- SafeSize newSize = SafeSize (count) + m_current_position;
509
+ msl::safeint3::SafeInt< size_t > newSize = msl::safeint3::SafeInt< size_t > (count) +m_current_position;
510
510
511
511
if ( newSize > m_size )
512
512
throw std::runtime_error (" Writing past the end of the buffer" );
0 commit comments