mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Fix compilation by using std::ptrdiff_t instead of ptrdiff_t
Signed-off-by: lledey <lledey@gmail.com>
This commit is contained in:
@@ -2218,9 +2218,9 @@ static CharType_t **make_null_terminated_array_helper(const std::vector<std::bas
|
|||||||
*pointers++ = NULL;
|
*pointers++ = NULL;
|
||||||
|
|
||||||
// Make sure we know what we're doing
|
// Make sure we know what we're doing
|
||||||
assert((unsigned char *)pointers - base == (ptrdiff_t)pointers_allocation_len);
|
assert((unsigned char *)pointers - base == (std::ptrdiff_t)pointers_allocation_len);
|
||||||
assert((unsigned char *)strings - (unsigned char *)pointers == (ptrdiff_t)strings_allocation_len);
|
assert((unsigned char *)strings - (unsigned char *)pointers == (std::ptrdiff_t)strings_allocation_len);
|
||||||
assert((unsigned char *)strings - base == (ptrdiff_t)(pointers_allocation_len + strings_allocation_len));
|
assert((unsigned char *)strings - base == (std::ptrdiff_t)(pointers_allocation_len + strings_allocation_len));
|
||||||
|
|
||||||
// Return what we did
|
// Return what we did
|
||||||
return reinterpret_cast<CharType_t**>(base);
|
return reinterpret_cast<CharType_t**>(base);
|
||||||
@@ -2235,4 +2235,3 @@ char **make_null_terminated_array(const std::vector<std::string> &lst)
|
|||||||
{
|
{
|
||||||
return make_null_terminated_array_helper(lst);
|
return make_null_terminated_array_helper(lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user