diff --git a/src/apps/haikudepot/model/LocalIconStore.cpp b/src/apps/haikudepot/model/LocalIconStore.cpp index 5cc8823127..a1b925355f 100644 --- a/src/apps/haikudepot/model/LocalIconStore.cpp +++ b/src/apps/haikudepot/model/LocalIconStore.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2017, Andrew Lindesay . + * Copyright 2017-2020, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -68,22 +68,22 @@ status_t LocalIconStore::_IdentifyBestIconFileAtDirectory(const BPath& directory, BPath& bestIconPath) const { - StringList iconLeafnames; - - iconLeafnames.Add("icon.hvif"); - iconLeafnames.Add("64.png"); - iconLeafnames.Add("32.png"); - iconLeafnames.Add("16.png"); + static const char* kIconLeafnames[] = { + "icon.hvif", + "64.png", + "32.png", + "16.png", + NULL + }; bestIconPath.Unset(); - for (int32 i = 0; i < iconLeafnames.CountItems(); i++) { - BString iconLeafname = iconLeafnames.ItemAt(i); + for (int32 i = 0; kIconLeafnames[i] != NULL; i++) { BPath workingPath(directory); bool exists; bool isDir; - if ( (workingPath.Append(iconLeafname) == B_OK + if ( (workingPath.Append(kIconLeafnames[i]) == B_OK && StorageUtils::ExistsObject( workingPath, &exists, &isDir, NULL) == B_OK) && exists diff --git a/src/apps/haikudepot/server/ProcessCoordinator.cpp b/src/apps/haikudepot/server/ProcessCoordinator.cpp index e1cccdb180..dad63c7ef9 100644 --- a/src/apps/haikudepot/server/ProcessCoordinator.cpp +++ b/src/apps/haikudepot/server/ProcessCoordinator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2018, Andrew Lindesay . + * Copyright 2018-2020, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -104,7 +104,7 @@ void ProcessCoordinator::AddNode(ProcessNode* node) { AutoLocker locker(&fLock); - fNodes.Add(node); + fNodes.AddItem(node); node->Process()->SetListener(this); } diff --git a/src/apps/haikudepot/server/ProcessCoordinator.h b/src/apps/haikudepot/server/ProcessCoordinator.h index c7102f1075..24df34419c 100644 --- a/src/apps/haikudepot/server/ProcessCoordinator.h +++ b/src/apps/haikudepot/server/ProcessCoordinator.h @@ -1,5 +1,5 @@ /* - * Copyright 2018, Andrew Lindesay . + * Copyright 2018-2020, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -9,9 +9,10 @@ #include "ProcessCoordinator.h" +#include + #include "AbstractProcess.h" #include "ProcessNode.h" -#include "List.h" class ProcessCoordinator; @@ -111,7 +112,7 @@ private: private: BString fName; BLocker fLock; - List + BObjectList fNodes; ProcessCoordinatorListener* fListener; diff --git a/src/apps/haikudepot/server/ProcessNode.cpp b/src/apps/haikudepot/server/ProcessNode.cpp index 259fd726a5..edabc205fc 100644 --- a/src/apps/haikudepot/server/ProcessNode.cpp +++ b/src/apps/haikudepot/server/ProcessNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2018, Andrew Lindesay . + * Copyright 2018-2020, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -142,7 +142,7 @@ ProcessNode::_StartProcess(void* cookie) void ProcessNode::AddPredecessor(ProcessNode *node) { - fPredecessorNodes.Add(node); + fPredecessorNodes.AddItem(node); node->_AddSuccessor(this); } @@ -176,7 +176,7 @@ ProcessNode::AllPredecessorsComplete() const void ProcessNode::_AddSuccessor(ProcessNode* node) { - fSuccessorNodes.Add(node); + fSuccessorNodes.AddItem(node); } diff --git a/src/apps/haikudepot/server/ProcessNode.h b/src/apps/haikudepot/server/ProcessNode.h index f03c823745..0fd380dcad 100644 --- a/src/apps/haikudepot/server/ProcessNode.h +++ b/src/apps/haikudepot/server/ProcessNode.h @@ -1,5 +1,5 @@ /* - * Copyright 2018, Andrew Lindesay . + * Copyright 2018-2020, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ @@ -7,11 +7,9 @@ #ifndef PROCESS_NODE_H #define PROCESS_NODE_H - +#include #include -#include "List.h" - class AbstractProcess; @@ -48,9 +46,9 @@ private: thread_id fWorker; AbstractProcess* fProcess; - List + BObjectList fPredecessorNodes; - List + BObjectList fSuccessorNodes; };