Skip to content

Commit

Permalink
ADE version 0.1.1 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardcode84 authored Sep 24, 2018
1 parent 0ba3b01 commit 676db97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/ade/include/ade/typed_metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Metadata final

MetadataHolder& operator=(const MetadataHolder&) = delete;

virtual MetadataHolderPtr clone() const
virtual MetadataHolderPtr clone() const override
{
return MetadataHolderPtr(new MetadataHolder<T>(*this));
}
Expand Down
10 changes: 9 additions & 1 deletion sources/ade/source/alloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

#include "ade/memory/alloc.hpp"

#ifdef WIN32
#include <malloc.h>
#else
#include <algorithm>
#include <stdlib.h>
#endif

#include "ade/util/math.hpp"
#include "ade/util/assert.hpp"
Expand All @@ -20,7 +25,10 @@ void* aligned_alloc(std::size_t size, std::size_t alignment)
#ifdef WIN32
return _aligned_malloc(size, alignment);
#else
return memalign(alignment, size);
void* ret = nullptr;
auto res = posix_memalign(&ret, std::max(sizeof(void*), alignment), size);
(void)res;
return ret;
#endif
}

Expand Down

0 comments on commit 676db97

Please sign in to comment.