more work to get rid of raw pointers.
This commit is contained in:
@@ -200,8 +200,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
std::unique_ptr<TSAXParser> saxParser = std::unique_ptr<TSAXParser>(new TSAXParser());
|
||||
std::unique_ptr<PStartupHandler> startupHandler = std::unique_ptr<PStartupHandler>(new PStartupHandler());
|
||||
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||
if (!startupHandler->StartupFileFound()) {
|
||||
std::cerr << std::endl << ">> musrview **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||
std::cerr << std::endl;
|
||||
@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// read msr-file
|
||||
std::unique_ptr<PMsrHandler> msrHandler = std::unique_ptr<PMsrHandler>(new PMsrHandler(fileName));
|
||||
std::unique_ptr<PMsrHandler> msrHandler = std::make_unique<PMsrHandler>(fileName);
|
||||
status = msrHandler->ReadMsrFile();
|
||||
if (status != PMUSR_SUCCESS) {
|
||||
switch (status) {
|
||||
@@ -262,9 +262,9 @@ int main(int argc, char *argv[])
|
||||
// read all the necessary runs (raw data)
|
||||
std::unique_ptr<PRunDataHandler> dataHandler;
|
||||
if (startupHandler)
|
||||
dataHandler = std::unique_ptr<PRunDataHandler>(new PRunDataHandler(msrHandler.get(), startupHandler->GetDataPathList()));
|
||||
dataHandler = std::make_unique<PRunDataHandler>(msrHandler.get(), startupHandler->GetDataPathList());
|
||||
else
|
||||
dataHandler = std::unique_ptr<PRunDataHandler>(new PRunDataHandler(msrHandler.get()));
|
||||
dataHandler = std::make_unique<PRunDataHandler>(msrHandler.get());
|
||||
|
||||
dataHandler->ReadData();
|
||||
|
||||
@@ -278,7 +278,7 @@ int main(int argc, char *argv[])
|
||||
std::unique_ptr<PRunListCollection> runListCollection;
|
||||
if (result == PMUSR_SUCCESS) {
|
||||
// feed all the necessary histogramms for the view
|
||||
runListCollection = std::unique_ptr<PRunListCollection>(new PRunListCollection(msrHandler.get(), dataHandler.get(), theoAtData));
|
||||
runListCollection = std::make_unique<PRunListCollection>(msrHandler.get(), dataHandler.get(), theoAtData);
|
||||
for (unsigned int i=0; i<msrHandler->GetMsrRunList()->size(); i++) {
|
||||
// if run is in plotList add it, otherwise go to the next
|
||||
runPresent = false;
|
||||
|
||||
Reference in New Issue
Block a user