mirror of https://gitee.com/bigwinds/arangodb
small fixes
This commit is contained in:
parent
7695403388
commit
473877b3df
|
@ -137,7 +137,7 @@ class FrequencyBuffer {
|
|||
data.emplace_back(std::pair<T, uint64_t>(f.first, f.second));
|
||||
}
|
||||
std::sort(data.begin(), data.end(),
|
||||
[](std::pair<T, uint64_t>& left, std::pair<T, uint64_t>& right) {
|
||||
[](std::pair<T, uint64_t> const& left, std::pair<T, uint64_t> const& right) {
|
||||
return left.second < right.second;
|
||||
});
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class arena {
|
|||
return (n + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
bool pointer_in_buffer(char* p) noexcept {
|
||||
bool pointer_in_buffer(char* p) const noexcept {
|
||||
return buf_ <= p && p <= buf_ + N;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -100,9 +100,9 @@ class V8Buffer : public V8Wrapper<V8Buffer, TRI_V8_BUFFER_CID> {
|
|||
/// @brief the buffer data for a handle
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static inline char* data(v8::Isolate* isolate, v8::Handle<v8::Value> val) {
|
||||
static inline char* data(v8::Isolate* iso, v8::Handle<v8::Value> val) {
|
||||
TRI_ASSERT(val->IsObject());
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
v8::Local<v8::Context> context = iso->GetCurrentContext();
|
||||
auto o = TRI_GetObject(context, val);
|
||||
int32_t offsetValue = 0;
|
||||
|
||||
|
@ -155,9 +155,9 @@ class V8Buffer : public V8Wrapper<V8Buffer, TRI_V8_BUFFER_CID> {
|
|||
/// @brief length of the data for a handle
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static inline size_t length(v8::Isolate* isolate, v8::Handle<v8::Value> val) {
|
||||
static inline size_t length(v8::Isolate* iso, v8::Handle<v8::Value> val) {
|
||||
TRI_ASSERT(val->IsObject());
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
v8::Local<v8::Context> context = iso->GetCurrentContext();
|
||||
auto o = TRI_GetObject(context, val);
|
||||
int32_t lengthValue = -1;
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
ferr() { echo "$*"; exit 1; }
|
||||
|
||||
if [[ -n $* ]];
|
||||
files=( "$@" )
|
||||
then
|
||||
files=( arangod/ arangosh/ lib/ enterprise/ )
|
||||
fi
|
||||
|
||||
cppcheck "$@" \
|
||||
--xml --xml-version=2 \
|
||||
-I arangod \
|
||||
|
@ -13,7 +19,7 @@ cppcheck "$@" \
|
|||
-I lib \
|
||||
-D USE_PLAN_CACHE \
|
||||
--std=c++17 \
|
||||
--enable=warning,style,performance,portability,missingInclude \
|
||||
--enable=warning,performance,portability,missingInclude \
|
||||
--force \
|
||||
--quiet \
|
||||
--platform=unix64 \
|
||||
|
@ -50,7 +56,7 @@ cppcheck "$@" \
|
|||
--suppress="unreadVariable" \
|
||||
--suppress="useStlAlgorithm" \
|
||||
--suppress="variableScope" \
|
||||
arangod/ arangosh/ lib/ enterprise/ \
|
||||
"${files[@]}" \
|
||||
2> cppcheck.out.xml \
|
||||
|| ferr "failed to run cppcheck"
|
||||
|
||||
|
|
Loading…
Reference in New Issue