comparison OrthancServer/LuaScripting.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents 231b46ce1984
children 281045a1e6db
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
608 } 608 }
609 } 609 }
610 610
611 if (operation == "modify") 611 if (operation == "modify")
612 { 612 {
613 std::auto_ptr<DicomModification> modification(new DicomModification); 613 std::unique_ptr<DicomModification> modification(new DicomModification);
614 modification->ParseModifyRequest(parameters); 614 modification->ParseModifyRequest(parameters);
615 615
616 return lock.AddModifyInstanceOperation(context_, modification.release()); 616 return lock.AddModifyInstanceOperation(context_, modification.release());
617 } 617 }
618 618
747 747
748 void LuaScripting::EventThread(LuaScripting* that) 748 void LuaScripting::EventThread(LuaScripting* that)
749 { 749 {
750 for (;;) 750 for (;;)
751 { 751 {
752 std::auto_ptr<IDynamicObject> event(that->pendingEvents_.Dequeue(100)); 752 std::unique_ptr<IDynamicObject> event(that->pendingEvents_.Dequeue(100));
753 753
754 if (event.get() == NULL) 754 if (event.get() == NULL)
755 { 755 {
756 // The event queue is empty, check whether we should stop 756 // The event queue is empty, check whether we should stop
757 boost::recursive_mutex::scoped_lock lock(that->mutex_); 757 boost::recursive_mutex::scoped_lock lock(that->mutex_);