Tweaking
This commit is contained in:
parent
7eb0cc8a8f
commit
370f8f5086
|
@ -375,10 +375,10 @@ public:
|
|||
}
|
||||
|
||||
iterator(iterator &&o):
|
||||
pj(std::move(o.pj)), depth(std::move(o.depth)), location(std::move(o.location)),
|
||||
pj(o.pj), depth(std::move(o.depth)), location(std::move(o.location)),
|
||||
tape_length(std::move(o.tape_length)), current_type(std::move(o.current_type)),
|
||||
current_val(std::move(o.current_val)), depthindex(std::move(o.depthindex)) {
|
||||
o.depthindex = NULL;// we take ownship
|
||||
o.depthindex = NULL;// we take ownership
|
||||
}
|
||||
|
||||
WARN_UNUSED
|
||||
|
@ -728,7 +728,6 @@ private:
|
|||
p.ret_address=NULL;
|
||||
p.string_buf=NULL;
|
||||
p.current_string_buf_loc=NULL;
|
||||
p.isvalid=NULL;
|
||||
}
|
||||
|
||||
private :
|
||||
|
|
|
@ -46,20 +46,20 @@ static inline int hamming(uint64_t input_num) {
|
|||
#include <cstdint>
|
||||
|
||||
static inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) {
|
||||
return __builtin_uaddl_overflow(value1, value2, result);
|
||||
return __builtin_uaddl_overflow(value1, value2, (unsigned long *)result);
|
||||
}
|
||||
static inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *result) {
|
||||
return __builtin_umulll_overflow(value1, value2, result);
|
||||
return __builtin_umulll_overflow(value1, value2, (unsigned long long *)result);
|
||||
}
|
||||
|
||||
/* result might be undefined when input_num is zero */
|
||||
static inline int trailingzeroes(uint64_t input_num) {
|
||||
return __tzcnt_u64(input_num);
|
||||
return _tzcnt_u64(input_num);
|
||||
}
|
||||
|
||||
/* result might be undefined when input_num is zero */
|
||||
static inline int leadingzeroes(uint64_t input_num) {
|
||||
return __lzcnt_u64(input_num);
|
||||
return _lzcnt_u64(input_num);
|
||||
}
|
||||
|
||||
/* result might be undefined when input_num is zero */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "simdjson/jsonioutil.h"
|
||||
#include <cstring>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
char * allocate_padded_buffer(size_t length) {
|
||||
// we could do a simple malloc
|
||||
|
@ -13,7 +13,7 @@ char * allocate_padded_buffer(size_t length) {
|
|||
#elif defined(__MINGW32__) || defined(__MINGW64__)
|
||||
padded_buffer = __mingw_aligned_malloc(totalpaddedlength, 64);
|
||||
#else
|
||||
if (posix_memalign(&padded_buffer, 64, totalpaddedlength) != 0) return NULL;
|
||||
if (posix_memalign((void **)&padded_buffer, 64, totalpaddedlength) != 0) return NULL;
|
||||
#endif
|
||||
return padded_buffer;
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ scope_end:
|
|||
pj.annotate_previousloc(pj.containing_scope_offset[depth],
|
||||
pj.get_current_loc());
|
||||
// goto saved_state
|
||||
#ifdef SIMDJSON_USE_COMPUTED_GOT
|
||||
#ifdef SIMDJSON_USE_COMPUTED_GOTO
|
||||
goto *pj.ret_address[depth];
|
||||
#else
|
||||
if(pj.ret_address[depth] == 'a') {
|
||||
|
|
Loading…
Reference in New Issue