# HG changeset patch # User Sebastien Jodogne # Date 1380716524 -7200 # Node ID 0cef1adc056024abda1c5e0fa1773a04584881fa # Parent a042693cc6a9493b00896495a48c7178d711fd2b# Parent b2357f1f026f0a68c8732b3be7106014c01c6089 merge diff -r a042693cc6a9 -r 0cef1adc0560 OrthancCppClient/OrthancConnection.cpp --- a/OrthancCppClient/OrthancConnection.cpp Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancCppClient/OrthancConnection.cpp Wed Oct 02 14:22:04 2013 +0200 @@ -87,8 +87,8 @@ client_.SetUrl(orthancUrl_ + "/instances"); // Copy the DICOM file in the POST body. TODO - Avoid memory copy - client_.AccessPostData().resize(size); - memcpy(&client_.AccessPostData()[0], dicom, size); + client_.AccessPostData().resize(static_cast(size)); + memcpy(&client_.AccessPostData()[0], dicom, static_cast(size)); Json::Value v; if (!client_.Apply(v)) diff -r a042693cc6a9 -r 0cef1adc0560 OrthancCppClient/Series.cpp --- a/OrthancCppClient/Series.cpp Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancCppClient/Series.cpp Wed Oct 02 14:22:04 2013 +0200 @@ -504,6 +504,7 @@ float* progress) { ProgressToFloatListener listener(progress); - Load3DImageInternal(target, format, lineStride, stackStride, &listener); + Load3DImageInternal(target, format, static_cast(lineStride), + static_cast(stackStride), &listener); } } diff -r a042693cc6a9 -r 0cef1adc0560 OrthancCppClient/Series.h --- a/OrthancCppClient/Series.h Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancCppClient/Series.h Wed Oct 02 14:22:04 2013 +0200 @@ -127,7 +127,8 @@ int64_t stackStride, Orthanc::ThreadedCommandProcessor::IListener& listener) { - Load3DImageInternal(target, format, lineStride, stackStride, &listener); + Load3DImageInternal(target, format, static_cast(lineStride), + static_cast(stackStride), &listener); } void Load3DImage(void* target, @@ -135,7 +136,8 @@ int64_t lineStride, int64_t stackStride) { - Load3DImageInternal(target, format, lineStride, stackStride, NULL); + Load3DImageInternal(target, format, static_cast(lineStride), + static_cast(stackStride), NULL); } void Load3DImage(void* target, diff -r a042693cc6a9 -r 0cef1adc0560 OrthancServer/DatabaseWrapper.cpp --- a/OrthancServer/DatabaseWrapper.cpp Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancServer/DatabaseWrapper.cpp Wed Oct 02 14:22:04 2013 +0200 @@ -243,7 +243,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT parentId FROM Resources WHERE internalId=?"); - s.BindInt(0, resourceId); + s.BindInt64(0, resourceId); if (!s.Step()) { @@ -265,7 +265,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT publicId FROM Resources WHERE internalId=?"); - s.BindInt(0, resourceId); + s.BindInt64(0, resourceId); if (!s.Step()) { @@ -280,7 +280,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT resourceType FROM Resources WHERE internalId=?"); - s.BindInt(0, resourceId); + s.BindInt64(0, resourceId); if (!s.Step()) { @@ -295,8 +295,8 @@ int64_t child) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "UPDATE Resources SET parentId = ? WHERE internalId = ?"); - s.BindInt(0, parent); - s.BindInt(1, child); + s.BindInt64(0, parent); + s.BindInt64(1, child); s.Run(); } @@ -304,7 +304,7 @@ int64_t id) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT publicId FROM Resources WHERE parentId=?"); - s.BindInt(0, id); + s.BindInt64(0, id); childrenPublicIds = Json::arrayValue; while (s.Step()) @@ -319,7 +319,7 @@ signalRemainingAncestor_->Reset(); SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?"); - s.BindInt(0, id); + s.BindInt64(0, id); s.Run(); if (signalRemainingAncestor_->HasRemainingAncestor()) @@ -334,7 +334,7 @@ const std::string& value) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT OR REPLACE INTO Metadata VALUES(?, ?, ?)"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, type); s.BindString(2, value); s.Run(); @@ -344,7 +344,7 @@ MetadataType type) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Metadata WHERE id=? and type=?"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, type); s.Run(); } @@ -355,7 +355,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT value FROM Metadata WHERE id=? AND type=?"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, type); if (!s.Step()) @@ -375,7 +375,7 @@ target.clear(); SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT type FROM Metadata WHERE id=?"); - s.BindInt(0, id); + s.BindInt64(0, id); while (s.Step()) { @@ -429,11 +429,11 @@ const FileInfo& attachment) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO AttachedFiles VALUES(?, ?, ?, ?, ?, ?)"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, attachment.GetContentType()); s.BindString(2, attachment.GetUuid()); - s.BindInt(3, attachment.GetCompressedSize()); - s.BindInt(4, attachment.GetUncompressedSize()); + s.BindInt64(3, attachment.GetCompressedSize()); + s.BindInt64(4, attachment.GetUncompressedSize()); s.BindInt(5, attachment.GetCompressionType()); s.Run(); } @@ -445,7 +445,7 @@ SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT fileType FROM AttachedFiles WHERE id=?"); - s.BindInt(0, id); + s.BindInt64(0, id); while (s.Step()) { @@ -459,7 +459,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT uuid, uncompressedSize, compressionType, compressedSize FROM AttachedFiles WHERE id=? AND fileType=?"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, contentType); if (!s.Step()) @@ -484,7 +484,7 @@ for (size_t i = 0; i < flattened.GetSize(); i++) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO MainDicomTags VALUES(?, ?, ?, ?)"); - s.BindInt(0, id); + s.BindInt64(0, id); s.BindInt(1, flattened.GetElement(i).GetTag().GetGroup()); s.BindInt(2, flattened.GetElement(i).GetTag().GetElement()); s.BindString(3, flattened.GetElement(i).GetValue().AsString()); @@ -498,7 +498,7 @@ map.Clear(); SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM MainDicomTags WHERE id=?"); - s.BindInt(0, id); + s.BindInt64(0, id); while (s.Step()) { map.SetValue(s.ColumnInt(1), @@ -513,7 +513,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT a.publicId FROM Resources AS a, Resources AS b " "WHERE a.internalId = b.parentId AND b.internalId = ?"); - s.BindInt(0, id); + s.BindInt64(0, id); if (s.Step()) { @@ -532,7 +532,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT a.publicId FROM Resources AS a, Resources AS b " "WHERE a.parentId = b.internalId AND b.internalId = ?"); - s.BindInt(0, id); + s.BindInt64(0, id); result.clear(); @@ -548,7 +548,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT a.internalId FROM Resources AS a, Resources AS b " "WHERE a.parentId = b.internalId AND b.internalId = ?"); - s.BindInt(0, id); + s.BindInt64(0, id); result.clear(); @@ -566,7 +566,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO Changes VALUES(NULL, ?, ?, ?, ?)"); s.BindInt(0, changeType); - s.BindInt(1, internalId); + s.BindInt64(1, internalId); s.BindInt(2, resourceType); s.BindString(3, boost::posix_time::to_iso_string(date)); s.Run(); @@ -614,7 +614,7 @@ unsigned int maxResults) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM Changes WHERE seq>? ORDER BY seq LIMIT ?"); - s.BindInt(0, since); + s.BindInt64(0, since); s.BindInt(1, maxResults + 1); GetChangesInternal(target, s, since, maxResults); } @@ -711,7 +711,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM ExportedResources WHERE seq>? ORDER BY seq LIMIT ?"); - s.BindInt(0, since); + s.BindInt64(0, since); s.BindInt(1, maxResults + 1); GetExportedResources(target, s, since, maxResults); } @@ -873,7 +873,7 @@ SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT patientId FROM PatientRecyclingOrder " "WHERE patientId != ? ORDER BY seq ASC LIMIT 1"); - s.BindInt(0, patientIdToAvoid); + s.BindInt64(0, patientIdToAvoid); if (!s.Step()) { @@ -891,7 +891,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM PatientRecyclingOrder WHERE patientId = ?"); - s.BindInt(0, internalId); + s.BindInt64(0, internalId); return !s.Step(); } @@ -901,13 +901,13 @@ if (isProtected) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM PatientRecyclingOrder WHERE patientId=?"); - s.BindInt(0, internalId); + s.BindInt64(0, internalId); s.Run(); } else if (IsProtectedPatient(internalId)) { SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO PatientRecyclingOrder VALUES(NULL, ?)"); - s.BindInt(0, internalId); + s.BindInt64(0, internalId); s.Run(); } else @@ -955,7 +955,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM Resources WHERE internalId=?"); - s.BindInt(0, internalId); + s.BindInt64(0, internalId); return s.Step(); } diff -r a042693cc6a9 -r 0cef1adc0560 OrthancServer/ServerIndex.cpp --- a/OrthancServer/ServerIndex.cpp Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancServer/ServerIndex.cpp Wed Oct 02 14:22:04 2013 +0200 @@ -584,7 +584,7 @@ - SeriesStatus ServerIndex::GetSeriesStatus(int id) + SeriesStatus ServerIndex::GetSeriesStatus(int64_t id) { // Get the expected number of instances in this series (from the metadata) std::string s = db_->GetMetadata(id, MetadataType_Series_ExpectedNumberOfInstances); diff -r a042693cc6a9 -r 0cef1adc0560 OrthancServer/ServerIndex.h --- a/OrthancServer/ServerIndex.h Wed Oct 02 14:21:43 2013 +0200 +++ b/OrthancServer/ServerIndex.h Wed Oct 02 14:22:04 2013 +0200 @@ -78,7 +78,7 @@ void MainDicomTagsToJson(Json::Value& result, int64_t resourceId); - SeriesStatus GetSeriesStatus(int id); + SeriesStatus GetSeriesStatus(int64_t id); bool IsRecyclingNeeded(uint64_t instanceSize);