Mercurial > hg > orthanc
changeset 5805:8a8756b2dd0b find-refactoring
cleanup
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 23 Sep 2024 16:03:02 +0200 |
parents | 25df40a274fd |
children | 023a99146dd0 272b0d0eef38 |
files | OrthancServer/Plugins/Engine/PluginsEnumerations.cpp OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp OrthancServer/Sources/ServerEnumerations.h |
diffstat | 5 files changed, 3 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -122,9 +122,6 @@ case ChangeType_UpdatedMetadata: return OrthancPluginChangeType_UpdatedMetadata; - case ChangeType_INTERNAL_All: - return _OrthancPluginChangeType_All; - default: throw OrthancException(ErrorCode_ParameterOutOfRange); }
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Sep 23 16:03:02 2024 +0200 @@ -774,7 +774,6 @@ OrthancPluginChangeType_JobSuccess = 17, /*!< A Job has completed successfully */ OrthancPluginChangeType_JobFailure = 18, /*!< A Job has failed */ - _OrthancPluginChangeType_All = 65535, /*!< All jobs (when used as a filter in GetChanges) */ _OrthancPluginChangeType_INTERNAL = 0x7fffffff } OrthancPluginChangeType;
--- a/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -1276,7 +1276,6 @@ std::vector<std::string> filters; bool hasSince = false; bool hasTo = false; - // bool hasFilterType = false; if (since > 0) { @@ -1290,7 +1289,6 @@ } if (filterType.size() != 0) { - // hasFilterType = true; filters.push_back("changeType IN ( " + JoinChanges(filterType) + " )"); } @@ -1327,10 +1325,7 @@ { s.BindInt64(paramCounter++, to); } - // if (hasFilterType) - // { - // s.BindInt(paramCounter++, filterType); - // } + s.BindInt(paramCounter++, limit + 1); // we take limit+1 because we use the +1 to know if "Done" must be set to true GetChangesInternal(target, done, s, limit, returnFirstResults); }
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -89,7 +89,7 @@ ServerContext& context = OrthancRestApi::GetContext(call); int64_t since, to; - std::set<ChangeType> filterType; // = ChangeType_INTERNAL_All; + std::set<ChangeType> filterType; unsigned int limit; bool last;
--- a/OrthancServer/Sources/ServerEnumerations.h Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/ServerEnumerations.h Mon Sep 23 16:03:02 2024 +0200 @@ -200,9 +200,7 @@ // The changes below this point are not logged into the database ChangeType_Deleted = 4096, - ChangeType_NewChildInstance = 4097, - - ChangeType_INTERNAL_All = 65535 // used to filter changes + ChangeType_NewChildInstance = 4097 }; enum BuiltinDecoderTranscoderOrder