Bläddra i källkod

Small fixes and docs

channel
Ludovic 'Archivist' Lagouardette 3 år sedan
förälder
incheckning
c2ee4982b3
3 ändrade filer med 6 tillägg och 5 borttagningar
  1. +1
    -1
      include/gp/math/integer_math.hpp
  2. +1
    -0
      include/gp/math/q_math.hpp
  3. +4
    -4
      include/gp/pointers.hpp

+ 1
- 1
include/gp/math/integer_math.hpp Visa fil

@ -49,7 +49,7 @@ namespace gp {
v |= v >> 16;
v |= v >> 32;
return MultiplyDeBruijnBitPosition[(uint64_t)(v * 0x03f6eaf2cd271461) >> 58];
return MultiplyDeBruijnBitPosition[(uint64_t)(v * 0x03f6eaf2cd271461ULL) >> 58];
}
static_assert(log2<uint32_t>(7) == 2, "bad log2");

+ 1
- 0
include/gp/math/q_math.hpp Visa fil

@ -0,0 +1 @@
#pragma once

+ 4
- 4
include/gp/pointers.hpp Visa fil

@ -10,9 +10,9 @@
template<typename T>
class unique_ptr {
T* data;
gp::allocator const& owner;
gp::allocator& owner;
unique_ptr(T* _data, gp::allocator const& _owner)
unique_ptr(T* _data, gp::allocator& _owner)
: data(data)
, owner(_owner)
{}
@ -64,9 +64,9 @@ template
class shared_ptr {
T* data;
std::atomic_int* refcounter;
gp::allocator const& owner;
gp::allocator& owner;
shared_ptr(T* _data, gp::allocator const& _owner)
shared_ptr(T* _data, gp::allocator& _owner)
: data(data)
, owner(_owner)
{}

Laddar…
Avbryt
Spara