File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ namespace Gecode { namespace Kernel {
122122 * value is used.
123123 */
124124#ifndef GECODE_MEMORY_ALIGNMENT
125- #define GECODE_MEMORY_ALIGNMENT 8U
125+ #define GECODE_MEMORY_ALIGNMENT static_cast < size_t >( 8U );
126126#endif
127127 /* *
128128 * \brief Size of region area
Original file line number Diff line number Diff line change 3232 */
3333
3434#include < cstddef>
35- #include < algorithm>
3635
3736namespace Gecode {
3837
@@ -61,8 +60,8 @@ namespace Gecode {
6160 // / Amount of free memory
6261 size_t free;
6362 // / The actual memory area (allocated from top to bottom)
64- alignas (std::max (alignof (std::max_align_t ),
65- GECODE_MEMORY_ALIGNMENT) )
63+ alignas ((alignof (std::max_align_t ) > GECODE_MEMORY_ALIGNMENT) ?
64+ alignof (std:: max_align_t ) : GECODE_MEMORY_ALIGNMENT)
6665 double area[Kernel::MemoryConfig::region_area_size / sizeof (double )];
6766 // / A pointer to another chunk
6867 Chunk* next;
@@ -334,8 +333,8 @@ namespace Gecode {
334333 forceinline bool
335334 Region::Chunk::alloc (size_t s, void *& p) {
336335 Kernel::MemoryConfig::align
337- (s,std::max ( alignof (std::max_align_t ),
338- GECODE_MEMORY_ALIGNMENT));
336+ (s,(( alignof (std::max_align_t ) > GECODE_MEMORY_ALIGNMENT) ?
337+ alignof (std:: max_align_t ) : GECODE_MEMORY_ALIGNMENT));
339338 if (s > free)
340339 return false ;
341340 free -= s;
You can’t perform that action at this time.
0 commit comments