File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -20320,20 +20320,20 @@ and errors (when we didn't deal correctly with semi-constructed objects consiste
20320
20320
20321
20321
class Picture
20322
20322
{
20323
- size_t mx;
20324
- size_t my;
20323
+ ptrdiff_t mx;
20324
+ ptrdiff_t my;
20325
20325
vector<char> data;
20326
20326
20327
- static size_t check_size(size_t s )
20327
+ static ptrdiff_t check_size(ptrdiff_t size )
20328
20328
{
20329
20329
// invariant check
20330
- Expects(s > 0);
20331
- return s ;
20330
+ Expects(size > 0);
20331
+ return size ;
20332
20332
}
20333
20333
20334
20334
public:
20335
- // even more better would be a class for a 2D Size as one single parameter
20336
- Picture(size_t x, size_t y)
20335
+ // even better would be a class for a 2D Size as one single parameter
20336
+ Picture(ptrdiff_t x, ptrdiff_t y)
20337
20337
: mx(check_size(x))
20338
20338
, my(check_size(y))
20339
20339
// now we know x and y have a valid size
You can’t perform that action at this time.
0 commit comments