mirror of https://gitee.com/bigwinds/arangodb
cppcheck
This commit is contained in:
parent
a406ced17c
commit
c40bfe6557
|
@ -74,6 +74,9 @@ namespace triagens {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
public:
|
||||
|
||||
Syncer (Syncer const&) = delete;
|
||||
Syncer& operator= (Syncer const&) = delete;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief constructor
|
||||
|
|
|
@ -1690,7 +1690,6 @@ void RestReplicationHandler::handleCommandClusterInventory () {
|
|||
TRI_ERROR_CLUSTER_READING_PLAN_AGENCY);
|
||||
}
|
||||
else {
|
||||
map<string, AgencyCommResultEntry>::iterator it;
|
||||
VPackBuilder resultBuilder;
|
||||
resultBuilder.openObject();
|
||||
resultBuilder.add("collections", VPackValue(VPackValueType::Array));
|
||||
|
|
|
@ -73,7 +73,7 @@ struct ExcludeHandlerImpl : public VPackAttributeExcludeHandler {
|
|||
};
|
||||
|
||||
struct CustomTypeHandlerImpl : public VPackCustomTypeHandler {
|
||||
CustomTypeHandlerImpl (triagens::arango::CollectionNameResolver const* resolver)
|
||||
explicit CustomTypeHandlerImpl (triagens::arango::CollectionNameResolver const* resolver)
|
||||
: resolver(resolver) {
|
||||
}
|
||||
|
||||
|
|
|
@ -116,9 +116,8 @@ static void CleanupDocumentCollection (TRI_vocbase_col_t* collection,
|
|||
|
||||
// check if the collection is still in the "unloading" state. if not,
|
||||
// then someone has already triggered a reload or a deletion of the collection
|
||||
bool isUnloading = false;
|
||||
if (TRI_TRY_READ_LOCK_STATUS_VOCBASE_COL(collection)) {
|
||||
isUnloading = (collection->_status == TRI_VOC_COL_STATUS_UNLOADING);
|
||||
bool isUnloading = (collection->_status == TRI_VOC_COL_STATUS_UNLOADING);
|
||||
TRI_READ_UNLOCK_STATUS_VOCBASE_COL(collection);
|
||||
|
||||
if (! isUnloading) {
|
||||
|
|
|
@ -547,7 +547,7 @@ static TRI_vocbase_col_t* AddCollection (TRI_vocbase_t* vocbase,
|
|||
LOG_ERROR("duplicate entry for collection name '%s'", name);
|
||||
LOG_ERROR("collection id %llu has same name as already added collection %llu",
|
||||
(unsigned long long) cid,
|
||||
(unsigned long long) ((TRI_vocbase_col_t*) found)->_cid);
|
||||
(unsigned long long) static_cast<TRI_vocbase_col_t const*>(found)->_cid);
|
||||
|
||||
TRI_Free(TRI_UNKNOWN_MEM_ZONE, collection);
|
||||
TRI_set_errno(TRI_ERROR_ARANGO_DUPLICATE_NAME);
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace triagens {
|
|||
class VPackStringBufferAdapter final : public VPackSink {
|
||||
|
||||
public:
|
||||
VPackStringBufferAdapter (TRI_string_buffer_t* buffer)
|
||||
explicit VPackStringBufferAdapter (TRI_string_buffer_t* buffer)
|
||||
: _buffer(buffer) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue