On Fri, Dec 06, 2019 at 04:16:06PM +0300, Aleksei Nikiforov wrote: [...] > diff --git a/apt/apt-pkg/rebase_pointer.h b/apt/apt-pkg/rebase_pointer.h > new file mode 100644 > index 0000000..efc4074 > --- /dev/null > +++ b/apt/apt-pkg/rebase_pointer.h > @@ -0,0 +1,16 @@ > +#ifndef PKGLIB_REBASE_POINTER_H > +#define PKGLIB_REBASE_POINTER_H > + > +template > +static inline T* RebasePointer(T *ptr, const void * const old_base, const void * const new_base) > +{ > + return reinterpret_cast(reinterpret_cast(ptr) + (reinterpret_cast(new_base) - reinterpret_cast(old_base))); > +} > + > +template > +static inline const T* RebasePointer(const T *ptr, const void * const old_base, const void * const new_base) > +{ > + return reinterpret_cast(reinterpret_cast(ptr) + (reinterpret_cast(new_base) - reinterpret_cast(old_base))); This line is way too long - about twice longer than a normal line of code. Please break long lines. My edition of rebase_pointer.h had the maximum length of all lines within the traditional 80-symbol limit. -- ldv