mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
We do not need to check JFI validity if JSON document is valid
This commit is contained in:
parent
c5a651a8b7
commit
749cc48cd7
@ -297,6 +297,5 @@ void Export::registerFrame(const JFI_Object &info)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Update JSON list
|
// Update JSON list
|
||||||
if (JFI_Valid(info))
|
m_jsonList.append(info);
|
||||||
m_jsonList.append(info);
|
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,6 @@
|
|||||||
|
|
||||||
#include "FrameInfo.h"
|
#include "FrameInfo.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns @c true if the given JFI @info structure has a non-empty JSON document and a
|
|
||||||
* valid frame number.
|
|
||||||
*/
|
|
||||||
bool JFI_Valid(const JFI_Object &info)
|
|
||||||
{
|
|
||||||
return info.frameNumber >= 0 && !info.jsonDocument.isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Orders the given JFI @c list from least recent (first item) to most recent (last item)
|
* Orders the given JFI @c list from least recent (first item) to most recent (last item)
|
||||||
* using a simple Bubble-Sort algorithm.
|
* using a simple Bubble-Sort algorithm.
|
||||||
|
@ -35,9 +35,7 @@ typedef struct
|
|||||||
} JFI_Object;
|
} JFI_Object;
|
||||||
Q_DECLARE_METATYPE(JFI_Object)
|
Q_DECLARE_METATYPE(JFI_Object)
|
||||||
|
|
||||||
extern bool JFI_Valid(const JFI_Object &info);
|
|
||||||
extern void JFI_SortList(QList<JFI_Object> *list);
|
extern void JFI_SortList(QList<JFI_Object> *list);
|
||||||
|
|
||||||
extern JFI_Object JFI_Empty(const quint64 n = 0);
|
extern JFI_Object JFI_Empty(const quint64 n = 0);
|
||||||
extern JFI_Object JFI_CreateNew(const quint64 n, const QDateTime &t,
|
extern JFI_Object JFI_CreateNew(const quint64 n, const QDateTime &t,
|
||||||
const QJsonDocument &d);
|
const QJsonDocument &d);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user