build/stlport/src/aligned_buffer.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 #ifndef ALIGNED_BUFFER_H
     2 #define ALIGNED_BUFFER_H
     4 _STLP_BEGIN_NAMESPACE
     5 // this is for fake initialization
     6 template<class T>
     7 union _Stl_aligned_buffer {
     8   char buf[sizeof(T)];
     9   struct { double a; double b; } padding;
    11   T* operator&() {
    12     return __REINTERPRET_CAST(T*, this);
    13   }
    15   T const* operator&() const {
    16     return __REINTERPRET_CAST(T const*, this);
    17   }
    18 };
    19 _STLP_END_NAMESPACE
    21 #endif

mercurial