adj inline func
This commit is contained in:
parent
ab3ba3f2e4
commit
3c56f623ed
|
@ -966,6 +966,29 @@ static FORCE_INLINE int32_t tsdbKeyCmprFn(const void *p1, const void *p2) {
|
|||
// #define SL_NODE_FORWARD(n, l) ((n)->forwards[l])
|
||||
// #define SL_NODE_BACKWARD(n, l) ((n)->forwards[(n)->level + (l)])
|
||||
|
||||
static FORCE_INLINE TSDBROW *tsdbTbDataIterGet(STbDataIter *pIter) {
|
||||
if (pIter == NULL) return NULL;
|
||||
|
||||
if (pIter->pRow) {
|
||||
return pIter->pRow;
|
||||
}
|
||||
|
||||
if (pIter->backward) {
|
||||
if (pIter->pNode == pIter->pTbData->sl.pHead) {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (pIter->pNode == pIter->pTbData->sl.pTail) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pIter->pRow = &pIter->row;
|
||||
pIter->row = pIter->pNode->row;
|
||||
|
||||
return pIter->pRow;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
int64_t suid;
|
||||
int64_t uid;
|
||||
|
|
|
@ -66,29 +66,6 @@ int32_t tsdbIterMergerSkipTableData(SIterMerger *merger, const TABLEID *tbid);
|
|||
SRowInfo *tsdbIterMergerGetData(SIterMerger *merger);
|
||||
STombRecord *tsdbIterMergerGetTombRecord(SIterMerger *merger);
|
||||
|
||||
FORCE_INLINE TSDBROW *tsdbTbDataIterGet(STbDataIter *pIter) {
|
||||
if (pIter == NULL) return NULL;
|
||||
|
||||
if (pIter->pRow) {
|
||||
return pIter->pRow;
|
||||
}
|
||||
|
||||
if (pIter->backward) {
|
||||
if (pIter->pNode == pIter->pTbData->sl.pHead) {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (pIter->pNode == pIter->pTbData->sl.pTail) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pIter->pRow = &pIter->row;
|
||||
pIter->row = pIter->pNode->row;
|
||||
|
||||
return pIter->pRow;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue