提交 c214e229 编写于 作者: H hjxilinx

remove some unused code

上级 d414fed0
......@@ -186,8 +186,6 @@ bool tSkipListRemove(tSkipList *pSkipList, tSkipListKey *pKey);
*/
void tSkipListRemoveNode(tSkipList *pSkipList, tSkipListNode *pNode);
int32_t tSkipListDefaultCompare(tSkipList *pSkipList, tSkipListKey *a, tSkipListKey *b);
// for debug purpose only
void tSkipListPrint(tSkipList *pSkipList, int16_t nlevel);
......
......@@ -805,41 +805,3 @@ int32_t tSkipListPointQuery(tSkipList *pSkipList, tSkipListKey *pKey, int32_t nu
return retLen;
}
}
int32_t tSkipListDefaultCompare(tSkipList *pSkipList, tSkipListKey *a, tSkipListKey *b) {
switch (pSkipList->keyType) {
case TSDB_DATA_TYPE_TINYINT:
case TSDB_DATA_TYPE_SMALLINT:
case TSDB_DATA_TYPE_INT:
case TSDB_DATA_TYPE_BIGINT:
case TSDB_DATA_TYPE_BOOL: {
if (a->i64Key == b->i64Key) {
return 0;
} else {
return a->i64Key > b->i64Key ? 1 : -1;
}
};
case TSDB_DATA_TYPE_FLOAT:
case TSDB_DATA_TYPE_DOUBLE: {
if (fabs(a->dKey - b->dKey) < FLT_EPSILON) {
return 0;
} else {
return a->dKey > b->dKey ? 1 : -1;
}
};
case TSDB_DATA_TYPE_BINARY: {
if (a->nLen == b->nLen) {
int32_t ret = strncmp(a->pz, b->pz, a->nLen);
if (ret == 0) {
return 0;
} else {
return ret > 0 ? 1 : -1;
}
} else {
return a->nLen > b->nLen ? 1 : -1;
}
};
}
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册