From 749cc48cd7493de67c74e7553e25d145c34862e1 Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Fri, 24 Sep 2021 17:58:53 -0500 Subject: [PATCH] We do not need to check JFI validity if JSON document is valid --- src/CSV/Export.cpp | 3 +-- src/JSON/FrameInfo.cpp | 9 --------- src/JSON/FrameInfo.h | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/CSV/Export.cpp b/src/CSV/Export.cpp index 5039b8cc..668f706e 100644 --- a/src/CSV/Export.cpp +++ b/src/CSV/Export.cpp @@ -297,6 +297,5 @@ void Export::registerFrame(const JFI_Object &info) return; // Update JSON list - if (JFI_Valid(info)) - m_jsonList.append(info); + m_jsonList.append(info); } diff --git a/src/JSON/FrameInfo.cpp b/src/JSON/FrameInfo.cpp index 358a4cd9..d610cd9d 100644 --- a/src/JSON/FrameInfo.cpp +++ b/src/JSON/FrameInfo.cpp @@ -22,15 +22,6 @@ #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) * using a simple Bubble-Sort algorithm. diff --git a/src/JSON/FrameInfo.h b/src/JSON/FrameInfo.h index 2ca0c2be..4e2d70d3 100644 --- a/src/JSON/FrameInfo.h +++ b/src/JSON/FrameInfo.h @@ -35,9 +35,7 @@ typedef struct } JFI_Object; Q_DECLARE_METATYPE(JFI_Object) -extern bool JFI_Valid(const JFI_Object &info); extern void JFI_SortList(QList *list); - extern JFI_Object JFI_Empty(const quint64 n = 0); extern JFI_Object JFI_CreateNew(const quint64 n, const QDateTime &t, const QJsonDocument &d);