From f2810fe9fc48fa8c90cae6f8ca025ab744786cd8 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 19 Sep 2013 11:56:25 +0200 Subject: [PATCH] removed unused property --- arangod/IndexOperators/index-operator.c | 30 ++++++++++++------------- arangod/IndexOperators/index-operator.h | 5 ++--- arangod/VocBase/index.c | 3 --- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/arangod/IndexOperators/index-operator.c b/arangod/IndexOperators/index-operator.c index e5231d64a3..d9482c3f35 100644 --- a/arangod/IndexOperators/index-operator.c +++ b/arangod/IndexOperators/index-operator.c @@ -85,12 +85,12 @@ TRI_index_operator_t* TRI_CreateIndexOperator(TRI_index_operator_type_e operator return NULL; } - newLogicalOperator->_base._type = operatorType; - newLogicalOperator->_base._shaper = shaper; + newLogicalOperator->base._type = operatorType; + newLogicalOperator->base._shaper = shaper; newLogicalOperator->_left = leftOperand; newLogicalOperator->_right = rightOperand; - newOperator = &(newLogicalOperator->_base); + newOperator = &(newLogicalOperator->base); break; } @@ -107,14 +107,13 @@ TRI_index_operator_t* TRI_CreateIndexOperator(TRI_index_operator_type_e operator return NULL; } - newRelationOperator->_base._type = operatorType; - newRelationOperator->_base._shaper = shaper; + newRelationOperator->base._type = operatorType; + newRelationOperator->base._shaper = shaper; newRelationOperator->_parameters = parameters; newRelationOperator->_fields = fields; newRelationOperator->_numFields = numFields; - newRelationOperator->_collection = collection; - newOperator = &(newRelationOperator->_base); + newOperator = &(newRelationOperator->base); break; } @@ -176,7 +175,7 @@ void TRI_ClearIndexOperator(TRI_index_operator_t* indexOperator) { for (i = 0; i < relationOperator->_numFields; ++i) { // destroy each individual shapedJson object TRI_shaped_json_t* shaped = relationOperator->_fields + i; - TRI_DestroyShapedJson(relationOperator->_base._shaper, shaped); + TRI_DestroyShapedJson(relationOperator->base._shaper, shaped); } // free the memory pointer TRI_Free(TRI_UNKNOWN_MEM_ZONE, relationOperator->_fields); @@ -219,11 +218,11 @@ TRI_index_operator_t* TRI_CopyIndexOperator(TRI_index_operator_t* indexOperator) break; } - newLogicalOperator->_base._type = indexOperator->_type; - newLogicalOperator->_base._shaper = indexOperator->_shaper; + newLogicalOperator->base._type = indexOperator->_type; + newLogicalOperator->base._shaper = indexOperator->_shaper; newLogicalOperator->_left = TRI_CopyIndexOperator(oldLogicalOperator->_left); newLogicalOperator->_right = TRI_CopyIndexOperator(oldLogicalOperator->_right); - newOperator = &(newLogicalOperator->_base); + newOperator = &(newLogicalOperator->base); break; @@ -244,8 +243,8 @@ TRI_index_operator_t* TRI_CopyIndexOperator(TRI_index_operator_t* indexOperator) break; } - newRelationOperator->_base._type = indexOperator->_type; - newRelationOperator->_base._shaper = indexOperator->_shaper; + newRelationOperator->base._type = indexOperator->_type; + newRelationOperator->base._shaper = indexOperator->_shaper; if (oldRelationOperator->_parameters != NULL) { newRelationOperator->_parameters = TRI_CopyJson(TRI_UNKNOWN_MEM_ZONE, oldRelationOperator->_parameters); @@ -255,16 +254,15 @@ TRI_index_operator_t* TRI_CopyIndexOperator(TRI_index_operator_t* indexOperator) } if (oldRelationOperator->_fields != NULL) { - newRelationOperator->_fields = TRI_CopyShapedJson(oldRelationOperator->_base._shaper, oldRelationOperator->_fields); + newRelationOperator->_fields = TRI_CopyShapedJson(oldRelationOperator->base._shaper, oldRelationOperator->_fields); } else { newRelationOperator->_fields = NULL; } newRelationOperator->_numFields = oldRelationOperator->_numFields; - newRelationOperator->_collection = oldRelationOperator->_collection; - newOperator = &(newRelationOperator->_base); + newOperator = &(newRelationOperator->base); break; } diff --git a/arangod/IndexOperators/index-operator.h b/arangod/IndexOperators/index-operator.h index 892fa5f974..214743dd74 100644 --- a/arangod/IndexOperators/index-operator.h +++ b/arangod/IndexOperators/index-operator.h @@ -86,7 +86,7 @@ TRI_index_operator_t; //................................................................................ typedef struct TRI_logical_index_operator_s { - TRI_index_operator_t _base; + TRI_index_operator_t base; TRI_index_operator_t* _left; // could be a relation or another logical operator TRI_index_operator_t* _right; // could be a relation or another logical operator or null } @@ -98,12 +98,11 @@ TRI_logical_index_operator_t; //................................................................................ typedef struct TRI_relation_index_operator_s { - TRI_index_operator_t _base; + TRI_index_operator_t base; TRI_json_t* _parameters; // parameters with which this relation was called with TRI_shaped_json_t* _fields; // actual data from the parameters converted from // a json array to a shaped json array size_t _numFields; // number of fields in the array above - void* _collection; // required for the computation of the order operation } TRI_relation_index_operator_t; diff --git a/arangod/VocBase/index.c b/arangod/VocBase/index.c index b3c6172d73..61836ecb90 100644 --- a/arangod/VocBase/index.c +++ b/arangod/VocBase/index.c @@ -1412,7 +1412,6 @@ static int FillLookupSLOperator (TRI_index_operator_t* slOperator, TRI_primary_c relationOperator = (TRI_relation_index_operator_t*)(slOperator); relationOperator->_numFields = relationOperator->_parameters->_value._objects._length; - relationOperator->_collection = collection; relationOperator->_fields = TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_shaped_json_t) * relationOperator->_numFields, false); if (relationOperator->_fields != NULL) { for (j = 0; j < relationOperator->_numFields; ++j) { @@ -1445,7 +1444,6 @@ static int FillLookupSLOperator (TRI_index_operator_t* slOperator, TRI_primary_c relationOperator = (TRI_relation_index_operator_t*)(slOperator); relationOperator->_numFields = 0; - relationOperator->_collection = collection; relationOperator->_fields = NULL; // ....................................................................... @@ -2394,7 +2392,6 @@ static int FillLookupBitarrayOperator(TRI_index_operator_t* indexOperator, TRI_p relationOperator = (TRI_relation_index_operator_t*)(indexOperator); relationOperator->_numFields = relationOperator->_parameters->_value._objects._length; - relationOperator->_collection = collection; relationOperator->_fields = NULL; // bitarray indexes need only the json representation of values // even tough we use the json representation of the values sent by the client