diff --git a/headers/libs/linprog/Summand.h b/headers/libs/linprog/Summand.h index 8c8ff2c0a6..c855a577f9 100644 --- a/headers/libs/linprog/Summand.h +++ b/headers/libs/linprog/Summand.h @@ -34,7 +34,7 @@ private: Variable* fVar; }; -typedef BObjectList SummandList; +typedef BObjectList SummandList; } // namespace LinearProgramming diff --git a/headers/os/mail/MailSettings.h b/headers/os/mail/MailSettings.h index 26b63366d7..47733a0dd2 100644 --- a/headers/os/mail/MailSettings.h +++ b/headers/os/mail/MailSettings.h @@ -119,7 +119,7 @@ public: virtual bool HasBeenModified() const; private: - BObjectList fFiltersSettings; + BObjectList fFiltersSettings; }; diff --git a/headers/os/net/NetworkInterface.h b/headers/os/net/NetworkInterface.h index d966c34c0b..2b9b232622 100644 --- a/headers/os/net/NetworkInterface.h +++ b/headers/os/net/NetworkInterface.h @@ -108,7 +108,7 @@ public: const BNetworkRoute& route); status_t RemoveDefaultRoute(int family); status_t GetRoutes(int family, - BObjectList& routes) const; + BObjectList& routes) const; status_t GetDefaultRoute(int family, BNetworkRoute& route) const; status_t GetDefaultGateway(int family, diff --git a/headers/os/net/NetworkRoute.h b/headers/os/net/NetworkRoute.h index e30730ed7c..3e63e27fe5 100644 --- a/headers/os/net/NetworkRoute.h +++ b/headers/os/net/NetworkRoute.h @@ -54,12 +54,12 @@ static status_t GetDefaultGateway(int family, sockaddr& gateway); static status_t GetRoutes(int family, - BObjectList& routes); + BObjectList& routes); static status_t GetRoutes(int family, const char* interfaceName, - BObjectList& routes); + BObjectList& routes); static status_t GetRoutes(int family, const char* interfaceName, uint32 filterFlags, - BObjectList& routes); + BObjectList& routes); private: BNetworkRoute(const BNetworkRoute& other); diff --git a/headers/os/package/CommitTransactionResult.h b/headers/os/package/CommitTransactionResult.h index b67932d175..9c2eeb9e1d 100644 --- a/headers/os/package/CommitTransactionResult.h +++ b/headers/os/package/CommitTransactionResult.h @@ -150,7 +150,7 @@ public: const BCommitTransactionResult& other); private: - typedef BObjectList IssueList; + typedef BObjectList IssueList; private: BTransactionError fError; diff --git a/headers/os/package/PackageInfo.h b/headers/os/package/PackageInfo.h index bc4819f589..756051ad40 100644 --- a/headers/os/package/PackageInfo.h +++ b/headers/os/package/PackageInfo.h @@ -87,25 +87,25 @@ public: const BStringList& URLList() const; const BStringList& SourceURLList() const; - const BObjectList& + const BObjectList& GlobalWritableFileInfos() const; - const BObjectList& + const BObjectList& UserSettingsFileInfos() const; - const BObjectList& Users() const; + const BObjectList& Users() const; const BStringList& Groups() const; const BStringList& PostInstallScripts() const; const BStringList& PreUninstallScripts() const; - const BObjectList& ProvidesList() const; - const BObjectList& + const BObjectList& ProvidesList() const; + const BObjectList& RequiresList() const; - const BObjectList& + const BObjectList& SupplementsList() const; - const BObjectList& + const BObjectList& ConflictsList() const; - const BObjectList& + const BObjectList& FreshensList() const; const BStringList& ReplacesList() const; @@ -223,16 +223,16 @@ private: struct FieldName; struct PackageFileLocation; - typedef BObjectList ResolvableList; - typedef BObjectList + typedef BObjectList ResolvableList; + typedef BObjectList ResolvableExpressionList; - typedef BObjectList + typedef BObjectList GlobalWritableFileInfoList; - typedef BObjectList + typedef BObjectList UserSettingsFileInfoList; - typedef BObjectList UserList; + typedef BObjectList UserList; private: status_t _ReadFromPackageFile( @@ -298,8 +298,8 @@ private: BStringList fURLList; BStringList fSourceURLList; - BObjectList fGlobalWritableFileInfos; - BObjectList fUserSettingsFileInfos; + GlobalWritableFileInfoList fGlobalWritableFileInfos; + UserSettingsFileInfoList fUserSettingsFileInfos; UserList fUsers; BStringList fGroups; diff --git a/headers/os/package/solver/SolverProblem.h b/headers/os/package/solver/SolverProblem.h index 4cd6df8668..923e5cbf29 100644 --- a/headers/os/package/solver/SolverProblem.h +++ b/headers/os/package/solver/SolverProblem.h @@ -64,7 +64,7 @@ public: BString ToString() const; private: - typedef BObjectList SolutionList; + typedef BObjectList SolutionList; private: BType fType; diff --git a/headers/os/package/solver/SolverProblemSolution.h b/headers/os/package/solver/SolverProblemSolution.h index 767611d14f..0ceb8af0a5 100644 --- a/headers/os/package/solver/SolverProblemSolution.h +++ b/headers/os/package/solver/SolverProblemSolution.h @@ -77,7 +77,7 @@ public: bool AppendElement(const Element& element); private: - typedef BObjectList ElementList; + typedef BObjectList ElementList; private: ElementList fElements; diff --git a/headers/os/package/solver/SolverRepository.h b/headers/os/package/solver/SolverRepository.h index de3d63c4f2..9655851967 100644 --- a/headers/os/package/solver/SolverRepository.h +++ b/headers/os/package/solver/SolverRepository.h @@ -71,7 +71,7 @@ public: uint64 ChangeCount() const; private: - typedef BObjectList PackageList; + typedef BObjectList PackageList; private: BString fName; diff --git a/headers/os/package/solver/SolverResult.h b/headers/os/package/solver/SolverResult.h index c14b691649..b0c54db14f 100644 --- a/headers/os/package/solver/SolverResult.h +++ b/headers/os/package/solver/SolverResult.h @@ -54,7 +54,7 @@ public: const BSolverResultElement& element); private: - typedef BObjectList ElementList; + typedef BObjectList ElementList; private: ElementList fElements; diff --git a/headers/os/support/ObjectList.h b/headers/os/support/ObjectList.h index af30f89196..4633ac553b 100644 --- a/headers/os/support/ObjectList.h +++ b/headers/os/support/ObjectList.h @@ -46,7 +46,7 @@ All rights reserved. // optional object ownership, search, insert operations, etc. // -template class BObjectList; +template class BObjectList; template @@ -61,7 +61,8 @@ struct UnaryPredicate { private: static int _unary_predicate_glue(const void *item, void *context); - friend class BObjectList; + friend class BObjectList; + friend class BObjectList; }; @@ -100,17 +101,16 @@ public: void *state) const; int32 BinarySearchIndexByPredicate(const void *, UnaryPredicateGlue) const; - bool Owning() const; bool ReplaceItem(int32, void *); bool MoveItem(int32 from, int32 to); -protected: - bool owning; - +private: + bool fLegacyOwning; + // here only for API/ABI compatibility }; -template +template class BObjectList : private _PointerList_ { public: // iteration and sorting @@ -120,8 +120,7 @@ public: typedef int (*CompareFunctionWithState)(const T*, const T*, void* state); - BObjectList(int32 itemsPerBlock = 20, - bool owning = false); + BObjectList(int32 itemsPerBlock = 20); BObjectList(const BObjectList& list); // clones list; if list is owning, makes // copies of all the items @@ -408,28 +407,20 @@ EachListItem(BObjectList* list, // inline code -inline bool -_PointerList_::Owning() const -{ - return owning; -} - - -template -BObjectList::BObjectList(int32 itemsPerBlock, bool owning) +template +BObjectList::BObjectList(int32 itemsPerBlock) : - _PointerList_(itemsPerBlock, owning) + _PointerList_(itemsPerBlock, Owning) { } -template -BObjectList::BObjectList(const BObjectList& list) +template +BObjectList::BObjectList(const BObjectList& list) : _PointerList_(list) { - owning = list.owning; - if (owning) { + if (O) { // make our own copies in an owning list int32 count = list.CountItems(); for (int32 index = 0; index < count; index++) { @@ -442,23 +433,22 @@ BObjectList::BObjectList(const BObjectList& list) } -template -BObjectList::~BObjectList() +template +BObjectList::~BObjectList() { - if (Owning()) { + if (Owning) { // have to nuke elements first MakeEmpty(); } } -template -BObjectList& -BObjectList::operator=(const BObjectList& list) +template +BObjectList& +BObjectList::operator=(const BObjectList& list) { - owning = list.owning; - BObjectList &result = (BObjectList&)_PointerList_::operator=(list); - if (owning) { + BObjectList &result = (BObjectList&)_PointerList_::operator=(list); + if (Owning) { // make our own copies in an owning list int32 count = list.CountItems(); for (int32 index = 0; index < count; index++) { @@ -472,82 +462,82 @@ BObjectList::operator=(const BObjectList& list) } -template +template bool -BObjectList::AddItem(T* item) +BObjectList::AddItem(T* item) { // need to cast to void* to make T work for const pointers return _PointerList_::AddItem((void*)item); } -template +template bool -BObjectList::AddItem(T* item, int32 index) +BObjectList::AddItem(T* item, int32 index) { return _PointerList_::AddItem((void*)item, index); } -template +template bool -BObjectList::AddList(BObjectList* list) +BObjectList::AddList(BObjectList* list) { return _PointerList_::AddList(list); } -template +template bool -BObjectList::AddList(BObjectList* list, int32 index) +BObjectList::AddList(BObjectList* list, int32 index) { return _PointerList_::AddList(list, index); } -template +template bool -BObjectList::RemoveItem(T* item, bool deleteIfOwning) +BObjectList::RemoveItem(T* item, bool deleteIfOwning) { bool result = _PointerList_::RemoveItem((void*)item); - if (result && Owning() && deleteIfOwning) + if (result && Owning && deleteIfOwning) delete item; return result; } -template +template T* -BObjectList::RemoveItemAt(int32 index) +BObjectList::RemoveItemAt(int32 index) { return (T*)_PointerList_::RemoveItem(index); } -template +template inline T* -BObjectList::ItemAt(int32 index) const +BObjectList::ItemAt(int32 index) const { return (T*)_PointerList_::ItemAt(index); } -template +template bool -BObjectList::ReplaceItem(int32 index, T* item) +BObjectList::ReplaceItem(int32 index, T* item) { - if (owning) + if (Owning) delete ItemAt(index); return _PointerList_::ReplaceItem(index, (void*)item); } -template +template T* -BObjectList::SwapWithItem(int32 index, T* item) +BObjectList::SwapWithItem(int32 index, T* item) { T* result = ItemAt(index); _PointerList_::ReplaceItem(index, (void*)item); @@ -556,75 +546,75 @@ BObjectList::SwapWithItem(int32 index, T* item) } -template +template bool -BObjectList::MoveItem(int32 from, int32 to) +BObjectList::MoveItem(int32 from, int32 to) { return _PointerList_::MoveItem(from, to); } -template +template void -BObjectList::_SetItem(int32 index, T* newItem) +BObjectList::_SetItem(int32 index, T* newItem) { _PointerList_::ReplaceItem(index, (void*)newItem); } -template +template int32 -BObjectList::IndexOf(const T* item) const +BObjectList::IndexOf(const T* item) const { return _PointerList_::IndexOf((void*)item); } -template +template T* -BObjectList::FirstItem() const +BObjectList::FirstItem() const { return (T*)_PointerList_::FirstItem(); } -template +template T* -BObjectList::LastItem() const +BObjectList::LastItem() const { return (T*)_PointerList_::LastItem(); } -template +template bool -BObjectList::HasItem(const T* item) const +BObjectList::HasItem(const T* item) const { return _PointerList_::HasItem((void*)item); } -template +template bool -BObjectList::IsEmpty() const +BObjectList::IsEmpty() const { return _PointerList_::IsEmpty(); } -template +template int32 -BObjectList::CountItems() const +BObjectList::CountItems() const { return _PointerList_::CountItems(); } -template +template void -BObjectList::MakeEmpty(bool deleteIfOwning) +BObjectList::MakeEmpty(bool deleteIfOwning) { - if (owning && deleteIfOwning) { + if (Owning && deleteIfOwning) { int32 count = CountItems(); for (int32 index = 0; index < count; index++) delete ItemAt(index); @@ -633,26 +623,27 @@ BObjectList::MakeEmpty(bool deleteIfOwning) } -template +template T* -BObjectList::EachElement(EachFunction func, void* params) +BObjectList::EachElement(EachFunction func, void* params) { return (T*)_PointerList_::EachElement((GenericEachFunction)func, params); } -template +template const T* -BObjectList::EachElement(ConstEachFunction func, void* params) const +BObjectList::EachElement(ConstEachFunction func, void* params) const { return (const T*) - const_cast*>(this)->_PointerList_::EachElement( + const_cast*>(this)->_PointerList_::EachElement( (GenericEachFunction)func, params); } -template + +template const T* -BObjectList::FindIf(const UnaryPredicate& predicate) const +BObjectList::FindIf(const UnaryPredicate& predicate) const { int32 count = CountItems(); for (int32 index = 0; index < count; index++) { @@ -662,9 +653,10 @@ BObjectList::FindIf(const UnaryPredicate& predicate) const return 0; } -template + +template T* -BObjectList::FindIf(const UnaryPredicate& predicate) +BObjectList::FindIf(const UnaryPredicate& predicate) { int32 count = CountItems(); for (int32 index = 0; index < count; index++) { @@ -675,49 +667,49 @@ BObjectList::FindIf(const UnaryPredicate& predicate) } -template +template void -BObjectList::SortItems(CompareFunction function) +BObjectList::SortItems(CompareFunction function) { _PointerList_::SortItems((GenericCompareFunction)function); } -template +template void -BObjectList::SortItems(CompareFunctionWithState function, void* state) +BObjectList::SortItems(CompareFunctionWithState function, void* state) { _PointerList_::SortItems((GenericCompareFunctionWithState)function, state); } -template +template void -BObjectList::HSortItems(CompareFunction function) +BObjectList::HSortItems(CompareFunction function) { _PointerList_::HSortItems((GenericCompareFunction)function); } -template +template void -BObjectList::HSortItems(CompareFunctionWithState function, void* state) +BObjectList::HSortItems(CompareFunctionWithState function, void* state) { _PointerList_::HSortItems((GenericCompareFunctionWithState)function, state); } -template +template T* -BObjectList::BinarySearch(const T& key, CompareFunction func) const +BObjectList::BinarySearch(const T& key, CompareFunction func) const { return (T*)_PointerList_::BinarySearch(&key, (GenericCompareFunction)func); } -template +template T* -BObjectList::BinarySearch(const T& key, CompareFunctionWithState func, +BObjectList::BinarySearch(const T& key, CompareFunctionWithState func, void* state) const { return (T*)_PointerList_::BinarySearch(&key, @@ -725,10 +717,10 @@ BObjectList::BinarySearch(const T& key, CompareFunctionWithState func, } -template +template template T* -BObjectList::BinarySearchByKey(const Key& key, +BObjectList::BinarySearchByKey(const Key& key, int (*compare)(const Key*, const T*)) const { return (T*)_PointerList_::BinarySearch(&key, @@ -736,10 +728,10 @@ BObjectList::BinarySearchByKey(const Key& key, } -template +template template T* -BObjectList::BinarySearchByKey(const Key &key, +BObjectList::BinarySearchByKey(const Key &key, int (*compare)(const Key*, const T*, void*), void* state) const { return (T*)_PointerList_::BinarySearch(&key, @@ -747,18 +739,18 @@ BObjectList::BinarySearchByKey(const Key &key, } -template +template int32 -BObjectList::BinarySearchIndex(const T& item, CompareFunction compare) const +BObjectList::BinarySearchIndex(const T& item, CompareFunction compare) const { return _PointerList_::BinarySearchIndex(&item, (GenericCompareFunction)compare); } -template +template int32 -BObjectList::BinarySearchIndex(const T& item, +BObjectList::BinarySearchIndex(const T& item, CompareFunctionWithState compare, void* state) const { return _PointerList_::BinarySearchIndex(&item, @@ -766,10 +758,10 @@ BObjectList::BinarySearchIndex(const T& item, } -template +template template int32 -BObjectList::BinarySearchIndexByKey(const Key& key, +BObjectList::BinarySearchIndexByKey(const Key& key, int (*compare)(const Key*, const T*)) const { return _PointerList_::BinarySearchIndex(&key, @@ -777,9 +769,9 @@ BObjectList::BinarySearchIndexByKey(const Key& key, } -template +template bool -BObjectList::BinaryInsert(T* item, CompareFunction func) +BObjectList::BinaryInsert(T* item, CompareFunction func) { int32 index = _PointerList_::BinarySearchIndex(item, (GenericCompareFunction)func); @@ -792,9 +784,9 @@ BObjectList::BinaryInsert(T* item, CompareFunction func) } -template +template bool -BObjectList::BinaryInsert(T* item, CompareFunctionWithState func, +BObjectList::BinaryInsert(T* item, CompareFunctionWithState func, void* state) { int32 index = _PointerList_::BinarySearchIndex(item, @@ -808,9 +800,9 @@ BObjectList::BinaryInsert(T* item, CompareFunctionWithState func, } -template +template bool -BObjectList::BinaryInsertUnique(T* item, CompareFunction func) +BObjectList::BinaryInsertUnique(T* item, CompareFunction func) { int32 index = _PointerList_::BinarySearchIndex(item, (GenericCompareFunction)func); @@ -821,9 +813,9 @@ BObjectList::BinaryInsertUnique(T* item, CompareFunction func) } -template +template bool -BObjectList::BinaryInsertUnique(T* item, CompareFunctionWithState func, +BObjectList::BinaryInsertUnique(T* item, CompareFunctionWithState func, void* state) { int32 index = _PointerList_::BinarySearchIndex(item, @@ -835,9 +827,9 @@ BObjectList::BinaryInsertUnique(T* item, CompareFunctionWithState func, } -template +template T* -BObjectList::BinaryInsertCopy(const T& copyThis, CompareFunction func) +BObjectList::BinaryInsertCopy(const T& copyThis, CompareFunction func) { int32 index = _PointerList_::BinarySearchIndex(©This, (GenericCompareFunction)func); @@ -853,9 +845,9 @@ BObjectList::BinaryInsertCopy(const T& copyThis, CompareFunction func) } -template +template T* -BObjectList::BinaryInsertCopy(const T& copyThis, +BObjectList::BinaryInsertCopy(const T& copyThis, CompareFunctionWithState func, void* state) { int32 index = _PointerList_::BinarySearchIndex(©This, @@ -872,9 +864,9 @@ BObjectList::BinaryInsertCopy(const T& copyThis, } -template +template T* -BObjectList::BinaryInsertCopyUnique(const T& copyThis, CompareFunction func) +BObjectList::BinaryInsertCopyUnique(const T& copyThis, CompareFunction func) { int32 index = _PointerList_::BinarySearchIndex(©This, (GenericCompareFunction)func); @@ -888,9 +880,9 @@ BObjectList::BinaryInsertCopyUnique(const T& copyThis, CompareFunction func) } -template +template T* -BObjectList::BinaryInsertCopyUnique(const T& copyThis, +BObjectList::BinaryInsertCopyUnique(const T& copyThis, CompareFunctionWithState func, void* state) { int32 index = _PointerList_::BinarySearchIndex(©This, @@ -905,9 +897,9 @@ BObjectList::BinaryInsertCopyUnique(const T& copyThis, } -template +template int32 -BObjectList::FindBinaryInsertionIndex(const UnaryPredicate& pred, +BObjectList::FindBinaryInsertionIndex(const UnaryPredicate& pred, bool* alreadyInList) const { int32 index = _PointerList_::BinarySearchIndexByPredicate(&pred, @@ -923,17 +915,17 @@ BObjectList::FindBinaryInsertionIndex(const UnaryPredicate& pred, } -template +template bool -BObjectList::BinaryInsert(T* item, const UnaryPredicate& pred) +BObjectList::BinaryInsert(T* item, const UnaryPredicate& pred) { return AddItem(item, FindBinaryInsertionIndex(pred)); } -template +template bool -BObjectList::BinaryInsertUnique(T* item, const UnaryPredicate& pred) +BObjectList::BinaryInsertUnique(T* item, const UnaryPredicate& pred) { bool alreadyInList; int32 index = FindBinaryInsertionIndex(pred, &alreadyInList); diff --git a/headers/private/debugger/debug_info/SpecificImageDebugInfo.h b/headers/private/debugger/debug_info/SpecificImageDebugInfo.h index 00110d30b2..9fa30cc895 100644 --- a/headers/private/debugger/debug_info/SpecificImageDebugInfo.h +++ b/headers/private/debugger/debug_info/SpecificImageDebugInfo.h @@ -42,7 +42,7 @@ public: virtual ~SpecificImageDebugInfo(); virtual status_t GetFunctions( - const BObjectList& symbols, + const BObjectList& symbols, BObjectList& functions) = 0; // returns references @@ -93,7 +93,7 @@ public: protected: static status_t GetFunctionsFromSymbols( - const BObjectList& symbols, + const BObjectList& symbols, BObjectList& functions, DebuggerInterface* interface, const ImageInfo& imageInfo, diff --git a/headers/private/debugger/debug_info/TeamDebugInfo.h b/headers/private/debugger/debug_info/TeamDebugInfo.h index 817f02a688..1bf12e1cd0 100644 --- a/headers/private/debugger/debug_info/TeamDebugInfo.h +++ b/headers/private/debugger/debug_info/TeamDebugInfo.h @@ -96,7 +96,7 @@ private: struct SourceFileEntry; struct SourceFileHashDefinition; - typedef BObjectList SpecificInfoList; + typedef BObjectList SpecificInfoList; typedef BObjectList ImageList; typedef BOpenHashTable FunctionTable; typedef BOpenHashTable SourceFileTable; diff --git a/headers/private/debugger/elf/ElfFile.h b/headers/private/debugger/elf/ElfFile.h index c735ac9664..d1fbbc3730 100644 --- a/headers/private/debugger/elf/ElfFile.h +++ b/headers/private/debugger/elf/ElfFile.h @@ -164,8 +164,8 @@ public: private: struct SymbolLookupSource; - typedef BObjectList SectionList; - typedef BObjectList SegmentList; + typedef BObjectList SectionList; + typedef BObjectList SegmentList; private: template diff --git a/headers/private/debugger/model/DisassembledCode.h b/headers/private/debugger/model/DisassembledCode.h index 8ed734631c..1cfdab3604 100644 --- a/headers/private/debugger/model/DisassembledCode.h +++ b/headers/private/debugger/model/DisassembledCode.h @@ -52,7 +52,7 @@ public: private: struct Line; - typedef BObjectList LineList; + typedef BObjectList LineList; typedef BObjectList StatementList; private: diff --git a/headers/private/debugger/model/TypeComponentPath.h b/headers/private/debugger/model/TypeComponentPath.h index 0ded421df1..6876e134eb 100644 --- a/headers/private/debugger/model/TypeComponentPath.h +++ b/headers/private/debugger/model/TypeComponentPath.h @@ -138,7 +138,7 @@ public: { return !(*this == other); } private: - typedef BObjectList ComponentList; + typedef BObjectList ComponentList; private: ComponentList fComponents; diff --git a/headers/private/debugger/util/RangeList.h b/headers/private/debugger/util/RangeList.h index b37fc1ba50..c01678bbe5 100644 --- a/headers/private/debugger/util/RangeList.h +++ b/headers/private/debugger/util/RangeList.h @@ -30,7 +30,7 @@ struct Range { }; -class RangeList : private BObjectList +class RangeList : private BObjectList { public: RangeList(); diff --git a/headers/private/interface/Icon.h b/headers/private/interface/Icon.h index 4c68efddf5..0fabe9132a 100644 --- a/headers/private/interface/Icon.h +++ b/headers/private/interface/Icon.h @@ -43,7 +43,7 @@ public: uint32 which, uint32 flags, BIcon*& _icon); private: - typedef BObjectList BitmapList; + typedef BObjectList BitmapList; private: static BBitmap* _ConvertToRGB32(const BBitmap* bitmap, diff --git a/headers/private/interface/PrivateScreen.h b/headers/private/interface/PrivateScreen.h index e29a6efaff..580e732754 100644 --- a/headers/private/interface/PrivateScreen.h +++ b/headers/private/interface/PrivateScreen.h @@ -89,7 +89,7 @@ public: uint32 BytesPerRow(); private: - friend class BObjectList; + friend class BObjectList; BPrivateScreen(int32 id); ~BPrivateScreen(); diff --git a/headers/private/netservices/UrlContext.h b/headers/private/netservices/UrlContext.h index b84f0d2f55..ea3682dfa7 100644 --- a/headers/private/netservices/UrlContext.h +++ b/headers/private/netservices/UrlContext.h @@ -46,7 +46,7 @@ private: private: BNetworkCookieJar fCookieJar; BHttpAuthenticationMap* fAuthenticationMap; - typedef BObjectList BCertificateSet; + typedef BObjectList BCertificateSet; BCertificateSet fCertificates; BString fProxyHost; diff --git a/headers/private/package/hpkg/WriterImplBase.h b/headers/private/package/hpkg/WriterImplBase.h index 0533420799..326cb37bc3 100644 --- a/headers/private/package/hpkg/WriterImplBase.h +++ b/headers/private/package/hpkg/WriterImplBase.h @@ -116,10 +116,8 @@ protected: const BPackageVersion& version, BHPKGAttributeID attributeID = kDefaultVersionAttributeID); - void RegisterPackageResolvableExpressionList( - PackageAttributeList& attributeList, - const BObjectList< - BPackageResolvableExpression>& list, + void RegisterPackageResolvableExpressionList(PackageAttributeList& attributeList, + const BObjectList& list, uint8 id); PackageAttribute* AddStringAttribute(BHPKGAttributeID id, diff --git a/headers/private/package/manager/PackageManager.h b/headers/private/package/manager/PackageManager.h index e761151005..06338c3cd2 100644 --- a/headers/private/package/manager/PackageManager.h +++ b/headers/private/package/manager/PackageManager.h @@ -53,10 +53,10 @@ public: class ClientInstallationInterface; class UserInteractionHandler; - typedef BObjectList RemoteRepositoryList; + typedef BObjectList RemoteRepositoryList; typedef BObjectList InstalledRepositoryList; typedef BObjectList PackageList; - typedef BObjectList TransactionList; + typedef BObjectList TransactionList; enum { B_ADD_INSTALLED_REPOSITORIES = 0x01, @@ -245,7 +245,7 @@ public: void ApplyChanges(); private: - PackageList fDisabledPackages; + BObjectList fDisabledPackages; PackageList fPackagesToActivate; PackageList fPackagesToDeactivate; const char* fInitialName; diff --git a/headers/private/shared/MessageBuilder.h b/headers/private/shared/MessageBuilder.h index a5b55418fd..dfac3b0f1b 100644 --- a/headers/private/shared/MessageBuilder.h +++ b/headers/private/shared/MessageBuilder.h @@ -44,8 +44,8 @@ public: const void* pointer); private: - BObjectList fStack; - BObjectList fNameStack; + BObjectList fStack; + BObjectList fNameStack; BMessage* fCurrentMessage; }; diff --git a/headers/private/shared/TextTable.h b/headers/private/shared/TextTable.h index 3d37e388a9..9252a611be 100644 --- a/headers/private/shared/TextTable.h +++ b/headers/private/shared/TextTable.h @@ -33,8 +33,8 @@ public: private: struct Column; - typedef BObjectList ColumnList; - typedef BObjectList RowList; + typedef BObjectList ColumnList; + typedef BObjectList RowList; private: ColumnList fColumns; diff --git a/headers/private/shared/Thread.h b/headers/private/shared/Thread.h index 5ab9898d0e..e7d53012c5 100644 --- a/headers/private/shared/Thread.h +++ b/headers/private/shared/Thread.h @@ -81,17 +81,17 @@ private: class ThreadSequence : private SimpleThread { public: - static void Launch(BObjectList*, bool async = true, + static void Launch(BObjectList*, bool async = true, int32 priority = B_LOW_PRIORITY); private: - ThreadSequence(BObjectList*, int32 priority); + ThreadSequence(BObjectList*, int32 priority); ~ThreadSequence(); virtual void Run(); - static void Run(BObjectList*list); + static void Run(BObjectList* list); - BObjectList* fFunctorList; + BObjectList* fFunctorList; }; diff --git a/headers/private/storage/DiskDeviceList.h b/headers/private/storage/DiskDeviceList.h index 31e298146b..ba83539b4c 100644 --- a/headers/private/storage/DiskDeviceList.h +++ b/headers/private/storage/DiskDeviceList.h @@ -85,7 +85,7 @@ private: private: BLocker *fLocker; - BObjectList fDevices; + BObjectList fDevices; bool fSubscribed; }; diff --git a/headers/private/storage/MergedDirectory.h b/headers/private/storage/MergedDirectory.h index cf020bae60..66db7619b6 100644 --- a/headers/private/storage/MergedDirectory.h +++ b/headers/private/storage/MergedDirectory.h @@ -55,7 +55,7 @@ protected: // always invoked with index1 < index2 private: - typedef BObjectList DirectoryList; + typedef BObjectList DirectoryList; struct EntryNameSet; private: diff --git a/headers/private/storage/Partition.h b/headers/private/storage/Partition.h index 70a32bf97e..ac7321cf62 100644 --- a/headers/private/storage/Partition.h +++ b/headers/private/storage/Partition.h @@ -19,7 +19,7 @@ class BPartitionParameterEditor; class BDiskDeviceVisitor; class BDiskSystem; class BMutablePartition; -template class BObjectList; +template class BObjectList; class BPartitioningInfo; class BPath; class BVolume; @@ -106,9 +106,9 @@ public: status_t ValidateResize(off_t* size) const; status_t Resize(off_t size); - bool CanMove(BObjectList* + bool CanMove(BObjectList* unmovableDescendants = NULL, - BObjectList* + BObjectList* movableOnlyIfUnmounted = NULL) const; status_t ValidateMove(off_t* newOffset) const; status_t Move(off_t newOffset); diff --git a/headers/private/support/ObjectListPrivate.h b/headers/private/support/ObjectListPrivate.h index 017c033f42..fd84059f04 100644 --- a/headers/private/support/ObjectListPrivate.h +++ b/headers/private/support/ObjectListPrivate.h @@ -9,10 +9,10 @@ #include -template -class BObjectList::Private { +template +class BObjectList::Private { public: - Private(BObjectList* objectList) + Private(BObjectList* objectList) : fObjectList(objectList) { diff --git a/headers/private/tracker/NavMenu.h b/headers/private/tracker/NavMenu.h index 1d2d209d0c..81b398c730 100644 --- a/headers/private/tracker/NavMenu.h +++ b/headers/private/tracker/NavMenu.h @@ -46,7 +46,7 @@ All rights reserved. #include "SlowMenu.h" -template class BObjectList; +template class BObjectList; class BMenuItem; @@ -139,7 +139,7 @@ protected: // menu building state uint8 fFlags; - BObjectList* fItemList; + BObjectList* fItemList; EntryListBase* fContainer; bool fIteratingDesktop; diff --git a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp index 0d59b4caf3..5505c1e73d 100644 --- a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp +++ b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp @@ -611,7 +611,7 @@ KeyboardDevice::_EnqueueInlineInputMethod(int32 opcode, KeyboardInputDevice::KeyboardInputDevice() : - fDevices(2, true), + fDevices(2), fDeviceListLock("KeyboardInputDevice list"), fTeamMonitorWindow(NULL) { diff --git a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.h b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.h index 4f8dbf1f94..f0c69a7b75 100644 --- a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.h +++ b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.h @@ -98,7 +98,7 @@ private: status_t _AddDevice(const char* path); status_t _RemoveDevice(const char* path); - BObjectList fDevices; + BObjectList fDevices; BLocker fDeviceListLock; TeamMonitorWindow* fTeamMonitorWindow; }; diff --git a/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp b/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp index a16b93a3d0..8b299341b5 100644 --- a/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp +++ b/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp @@ -727,7 +727,7 @@ MouseDevice::_RemapButtons(uint32 buttons) const MouseInputDevice::MouseInputDevice() : - fDevices(2, true), + fDevices(2), fDeviceListLock("MouseInputDevice list") { MID_CALLED(); diff --git a/src/add-ons/input_server/devices/mouse/MouseInputDevice.h b/src/add-ons/input_server/devices/mouse/MouseInputDevice.h index b701e41b9f..2ceca1a6e1 100644 --- a/src/add-ons/input_server/devices/mouse/MouseInputDevice.h +++ b/src/add-ons/input_server/devices/mouse/MouseInputDevice.h @@ -44,7 +44,7 @@ private: status_t _RemoveDevice(const char* path); private: - BObjectList fDevices; + BObjectList fDevices; BLocker fDeviceListLock; }; diff --git a/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp b/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp index 805c86e08d..68e66fd95e 100644 --- a/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp +++ b/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp @@ -451,7 +451,7 @@ TabletDevice::_BuildMouseMessage(uint32 what, uint64 when, uint32 buttons, TabletInputDevice::TabletInputDevice() : - fDevices(2, true), + fDevices(2), fDeviceListLock("TabletInputDevice list") { TID_CALLED(); diff --git a/src/add-ons/input_server/devices/tablet/TabletInputDevice.h b/src/add-ons/input_server/devices/tablet/TabletInputDevice.h index 9bffa84e96..f0d49acbeb 100644 --- a/src/add-ons/input_server/devices/tablet/TabletInputDevice.h +++ b/src/add-ons/input_server/devices/tablet/TabletInputDevice.h @@ -45,7 +45,7 @@ private: status_t _RemoveDevice(const char* path); private: - BObjectList fDevices; + BObjectList fDevices; BLocker fDeviceListLock; }; diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp index 5429ddd70f..c1640119b1 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp @@ -312,7 +312,7 @@ public: CheckMailboxesCommand(IMAPConnectionWorker& worker) : fWorker(worker), - fFolders(5, false), + fFolders(5), fState(INIT), fFolder(NULL), fMailbox(NULL) diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp index 680c74c54a..d203c9af21 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp @@ -20,7 +20,7 @@ IMAPProtocol::IMAPProtocol(const BMailAccountSettings& settings) : BInboundMailProtocol("IMAP", settings), fSettings(settings.Name(), settings.InboundSettings()), - fWorkers(5, false) + fWorkers(5) { BPath destination = fSettings.Destination(); diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Protocol.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Protocol.cpp index 3e070f3e8c..e7030dcd0d 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Protocol.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Protocol.cpp @@ -27,7 +27,7 @@ Protocol::Protocol() : fSocket(NULL), fBufferedSocket(NULL), - fHandlerList(5, false), + fHandlerList(5), fCommandID(0), fIsConnected(false) { diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.cpp index 3d5eb7e8c1..9131080ca7 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.cpp @@ -193,7 +193,7 @@ RFC3501Encoding::_Unshift(BString& buffer, int32& bitsToWrite, int32& sextet, ArgumentList::ArgumentList() : - BObjectList(5, true) + BObjectList(5) { } diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.h b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.h index fbfe2f98b2..d49795515c 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.h +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Response.h @@ -35,7 +35,7 @@ private: }; -class ArgumentList : public BObjectList { +class ArgumentList : public BObjectList { public: ArgumentList(); ~ArgumentList(); diff --git a/src/apps/aboutsystem/HyperTextView.cpp b/src/apps/aboutsystem/HyperTextView.cpp index 0d5f219044..05c07b9739 100644 --- a/src/apps/aboutsystem/HyperTextView.cpp +++ b/src/apps/aboutsystem/HyperTextView.cpp @@ -98,10 +98,10 @@ struct HyperTextView::ActionInfo { class HyperTextView::ActionInfoList - : public BObjectList { + : public BObjectList { public: - ActionInfoList(int32 itemsPerBlock = 20, bool owning = false) - : BObjectList(itemsPerBlock, owning) + ActionInfoList(int32 itemsPerBlock = 20) + : BObjectList(itemsPerBlock) { } }; @@ -110,7 +110,7 @@ public: HyperTextView::HyperTextView(const char* name, uint32 flags) : BTextView(name, flags), - fActionInfos(new ActionInfoList(100, true)), + fActionInfos(new ActionInfoList(100)), fLastActionInfo(NULL) { } @@ -120,7 +120,7 @@ HyperTextView::HyperTextView(BRect frame, const char* name, BRect textRect, uint32 resizeMask, uint32 flags) : BTextView(frame, name, textRect, resizeMask, flags), - fActionInfos(new ActionInfoList(100, true)), + fActionInfos(new ActionInfoList(100)), fLastActionInfo(NULL) { } diff --git a/src/apps/charactermap/UnicodeBlockView.cpp b/src/apps/charactermap/UnicodeBlockView.cpp index 07217a4762..ada8ff06d9 100644 --- a/src/apps/charactermap/UnicodeBlockView.cpp +++ b/src/apps/charactermap/UnicodeBlockView.cpp @@ -24,7 +24,7 @@ BlockListItem::BlockListItem(const char* label, uint32 blockIndex) UnicodeBlockView::UnicodeBlockView(const char* name) : BListView(name), - fBlocks(kNumUnicodeBlocks, true), + fBlocks(kNumUnicodeBlocks), fShowPrivateBlocks(false), fShowContainedBlocksOnly(false) { diff --git a/src/apps/charactermap/UnicodeBlockView.h b/src/apps/charactermap/UnicodeBlockView.h index 9d583f7218..d20f678b78 100644 --- a/src/apps/charactermap/UnicodeBlockView.h +++ b/src/apps/charactermap/UnicodeBlockView.h @@ -50,7 +50,7 @@ private: void _CreateBlocks(); private: - BObjectList fBlocks; + BObjectList fBlocks; BString fFilter; bool fShowPrivateBlocks; bool fShowContainedBlocksOnly; diff --git a/src/apps/debuganalyzer/gui/table/AbstractTable.cpp b/src/apps/debuganalyzer/gui/table/AbstractTable.cpp index d4a2447fef..3009aba53b 100644 --- a/src/apps/debuganalyzer/gui/table/AbstractTable.cpp +++ b/src/apps/debuganalyzer/gui/table/AbstractTable.cpp @@ -109,7 +109,7 @@ AbstractTable::AbstractTable(const char* name, uint32 flags, border_style borderStyle, bool showHorizontalScrollbar) : BColumnListView(name, flags, borderStyle, showHorizontalScrollbar), - fColumns(20, false) + fColumns(20) { } diff --git a/src/apps/debuganalyzer/gui/table/TreeTable.cpp b/src/apps/debuganalyzer/gui/table/TreeTable.cpp index 4a75e48f5c..5e8e679dce 100644 --- a/src/apps/debuganalyzer/gui/table/TreeTable.cpp +++ b/src/apps/debuganalyzer/gui/table/TreeTable.cpp @@ -458,7 +458,7 @@ public: int32 IndexOf(TreeTableNode* child); private: - typedef BObjectList NodeList; + typedef BObjectList NodeList; private: TreeTableNode* fParent; @@ -532,7 +532,7 @@ bool TreeTableNode::AddChild(TreeTableNode* child, int32 index) { if (fChildren == NULL) { - fChildren = new(std::nothrow) NodeList(10, true); + fChildren = new(std::nothrow) NodeList(10); if (fChildren == NULL) return false; } diff --git a/src/apps/debugger/settings/DebuggerSettingsManager.cpp b/src/apps/debugger/settings/DebuggerSettingsManager.cpp index eed7021e88..db78cd6eda 100644 --- a/src/apps/debugger/settings/DebuggerSettingsManager.cpp +++ b/src/apps/debugger/settings/DebuggerSettingsManager.cpp @@ -28,7 +28,7 @@ DebuggerSettingsManager::DebuggerSettingsManager() : SettingsManager(), fLock("settings manager"), - fRecentTeamSettings(kMaxRecentTeamSettings, true), + fRecentTeamSettings(kMaxRecentTeamSettings), fUiSettingsFactory(NULL) { } diff --git a/src/apps/debugger/settings/DebuggerSettingsManager.h b/src/apps/debugger/settings/DebuggerSettingsManager.h index ae6bde4036..a183208568 100644 --- a/src/apps/debugger/settings/DebuggerSettingsManager.h +++ b/src/apps/debugger/settings/DebuggerSettingsManager.h @@ -29,7 +29,7 @@ public: virtual status_t SaveTeamSettings(const TeamSettings& settings); private: - typedef BObjectList TeamSettingsList; + typedef BObjectList TeamSettingsList; private: void _Unset(); diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp index ed5dacb51a..7849f37286 100644 --- a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp @@ -98,7 +98,7 @@ private: CommandLineUserInterface::CommandLineUserInterface() : fContext(new CliContext()), - fCommands(20, true), + fCommands(20), fShowSemaphore(-1), fShown(false), fTerminating(false) diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h index 0605c146eb..4ad3b5fc1e 100644 --- a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h @@ -55,7 +55,7 @@ public: private: struct CommandEntry; - typedef BObjectList CommandList; + typedef BObjectList CommandList; struct HelpCommand; diff --git a/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp b/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp index 2d61cfe74d..e78b5eb664 100644 --- a/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp +++ b/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp @@ -131,7 +131,7 @@ GraphicalUserInterface::GraphicalUserInterface() fTeamWindowMessenger(NULL), fFilePanelHandler(NULL), fFilePanel(NULL), - fDefaultActions(10, true) + fDefaultActions(10) { } diff --git a/src/apps/debugger/user_interface/gui/GraphicalUserInterface.h b/src/apps/debugger/user_interface/gui/GraphicalUserInterface.h index e2671c73e0..289efa09a7 100644 --- a/src/apps/debugger/user_interface/gui/GraphicalUserInterface.h +++ b/src/apps/debugger/user_interface/gui/GraphicalUserInterface.h @@ -62,7 +62,7 @@ private: BString fKey; int fDecision; }; - BObjectList fDefaultActions; + BObjectList fDefaultActions; }; diff --git a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp index fbd2f7a67a..6e6043fa5a 100644 --- a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp +++ b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp @@ -17,7 +17,7 @@ ConnectionConfigHandlerRoster::ConnectionConfigHandlerRoster() : fLock("config handler roster lock"), - fConfigHandlers(10, true) + fConfigHandlers(10) { } diff --git a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h index 524ffe70f4..320df55669 100644 --- a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h +++ b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h @@ -38,7 +38,7 @@ public: ConnectionConfigView*& _view) const; private: - typedef BObjectList HandlerList; + typedef BObjectList HandlerList; private: bool _GetHandler(const BString& name, diff --git a/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.cpp b/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.cpp index 3272d6e1c8..7b6bce6472 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.cpp @@ -174,7 +174,7 @@ ConsoleOutputView::SaveSettings(BMessage& settings) void ConsoleOutputView::_Init() { - fPendingOutput = new OutputInfoList(10, true); + fPendingOutput = new OutputInfoList(10); fWorkToDoSem = create_sem(0, "output_work_available"); if (fWorkToDoSem < 0) diff --git a/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.h b/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.h index b1cbd43ef9..9ea764b693 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.h +++ b/src/apps/debugger/user_interface/gui/team_window/ConsoleOutputView.h @@ -34,7 +34,7 @@ public: private: struct OutputInfo; - typedef BObjectList OutputInfoList; + typedef BObjectList OutputInfoList; private: void _Init(); diff --git a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp index 6817c4ee9d..f9e48cde68 100644 --- a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp @@ -154,7 +154,7 @@ public: template struct MarkerByLinePredicate; - typedef BObjectList MarkerList; + typedef BObjectList MarkerList; typedef BObjectList BreakpointMarkerList; void GetMarkers(uint32 minLine, uint32 maxLine, @@ -190,8 +190,8 @@ private: SourceCode* fSourceCode; StackTrace* fStackTrace; StackFrame* fStackFrame; - MarkerList fIPMarkers; - BreakpointMarkerList fBreakpointMarkers; + BObjectList fIPMarkers; + BObjectList fBreakpointMarkers; bool fIPMarkersValid; bool fBreakpointMarkersValid; @@ -626,8 +626,8 @@ SourceView::MarkerManager::MarkerManager(SourceView* sourceView, Team* team, fListener(listener), fStackTrace(NULL), fStackFrame(NULL), - fIPMarkers(10, true), - fBreakpointMarkers(20, true), + fIPMarkers(10), + fBreakpointMarkers(20), fIPMarkersValid(false), fBreakpointMarkersValid(false) { diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index 7f0ceb9b9e..d84c48ebd6 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -122,7 +122,7 @@ struct VariablesView::ExpressionInfoEntry : FunctionKey, ExpressionInfoList { ExpressionInfoEntry(FunctionID* function) : FunctionKey(function), - ExpressionInfoList(10, false) + ExpressionInfoList(10) { function->AcquireReference(); } @@ -1792,7 +1792,7 @@ VariablesView::VariablesView(Listener* listener) fPreviousViewState(NULL), fViewStateHistory(NULL), fExpressions(NULL), - fExpressionChildren(10, false), + fExpressionChildren(10), fTableCellContextMenuTracker(NULL), fPendingTypecastInfo(NULL), fTemporaryExpression(NULL), diff --git a/src/apps/debugger/user_interface/gui/value/ValueHandlerRoster.cpp b/src/apps/debugger/user_interface/gui/value/ValueHandlerRoster.cpp index 461e4c6fcf..6eb33546a0 100644 --- a/src/apps/debugger/user_interface/gui/value/ValueHandlerRoster.cpp +++ b/src/apps/debugger/user_interface/gui/value/ValueHandlerRoster.cpp @@ -25,7 +25,7 @@ ValueHandlerRoster::ValueHandlerRoster() : fLock("value handler roster"), - fValueHandlers(20, false) + fValueHandlers(20) { } diff --git a/src/apps/haikudepot/model/ValidationFailure.cpp b/src/apps/haikudepot/model/ValidationFailure.cpp index e94824cc9c..5f7819158b 100644 --- a/src/apps/haikudepot/model/ValidationFailure.cpp +++ b/src/apps/haikudepot/model/ValidationFailure.cpp @@ -103,7 +103,7 @@ ValidationFailure::Archive(BMessage* into, bool deep) const ValidationFailures::ValidationFailures(BMessage* from) : - fItems(20, true) + fItems(20) { _AddFromMessage(from); } @@ -111,7 +111,7 @@ ValidationFailures::ValidationFailures(BMessage* from) ValidationFailures::ValidationFailures() : - fItems(20, true) + fItems(20) { } diff --git a/src/apps/haikudepot/model/ValidationFailure.h b/src/apps/haikudepot/model/ValidationFailure.h index 93d93380b0..6f30477264 100644 --- a/src/apps/haikudepot/model/ValidationFailure.h +++ b/src/apps/haikudepot/model/ValidationFailure.h @@ -61,7 +61,7 @@ private: ValidationFailure* _GetOrCreateFailure(const BString& property); private: - BObjectList + BObjectList fItems; }; diff --git a/src/apps/mail/AddressTextControl.cpp b/src/apps/mail/AddressTextControl.cpp index d149a4e58c..6b7f716c67 100644 --- a/src/apps/mail/AddressTextControl.cpp +++ b/src/apps/mail/AddressTextControl.cpp @@ -118,7 +118,7 @@ class PeopleChoiceModel : public BAutoCompleter::ChoiceModel { public: PeopleChoiceModel() : - fChoices(5, true) + fChoices(5) { } @@ -174,7 +174,7 @@ public: } private: - BObjectList fChoices; + BObjectList fChoices; }; diff --git a/src/apps/mail/People.cpp b/src/apps/mail/People.cpp index b8650c8027..6c0ce39a66 100644 --- a/src/apps/mail/People.cpp +++ b/src/apps/mail/People.cpp @@ -106,7 +106,7 @@ Person::IsInGroup(const char* group) const PersonList::PersonList(QueryList& query) : fQueryList(query), - fPersons(10, true) + fPersons(10) { fQueryList.AddListener(this); } diff --git a/src/apps/mail/People.h b/src/apps/mail/People.h index 1d53e4617f..91bd6aca75 100644 --- a/src/apps/mail/People.h +++ b/src/apps/mail/People.h @@ -61,7 +61,7 @@ private: typedef std::map PersonMap; QueryList& fQueryList; - BObjectList fPersons; + BObjectList fPersons; PersonMap fPersonMap; }; diff --git a/src/apps/mail/QueryList.cpp b/src/apps/mail/QueryList.cpp index 948a888e17..7c403a909f 100644 --- a/src/apps/mail/QueryList.cpp +++ b/src/apps/mail/QueryList.cpp @@ -40,7 +40,7 @@ QueryListener::~QueryListener() QueryList::QueryList() : fQuit(false), - fListeners(5, true) + fListeners(5) { } diff --git a/src/apps/mail/QueryList.h b/src/apps/mail/QueryList.h index 104791976a..e277c80628 100644 --- a/src/apps/mail/QueryList.h +++ b/src/apps/mail/QueryList.h @@ -69,7 +69,7 @@ private: QueryVector fQueries; QueryVector fQueryQueue; ThreadVector fFetchThreads; - BObjectList fListeners; + BObjectList fListeners; }; diff --git a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp index 9c03e13c53..b922ac784b 100644 --- a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp +++ b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp @@ -471,7 +471,7 @@ PlaylistWindow::_UpdateTotalDuration(bigtime_t duration) PlaylistWindow::DurationListener::DurationListener(PlaylistWindow& parent) : PlaylistObserver(this), - fKnown(20, true), + fKnown(20), fTotalDuration(0), fParent(parent) { diff --git a/src/apps/mediaplayer/playlist/PlaylistWindow.h b/src/apps/mediaplayer/playlist/PlaylistWindow.h index 05aa5ccaea..a6bb57b5ba 100644 --- a/src/apps/mediaplayer/playlist/PlaylistWindow.h +++ b/src/apps/mediaplayer/playlist/PlaylistWindow.h @@ -70,7 +70,7 @@ private: int32 index); void _HandleItemRemoved(int32 index); - BObjectList + BObjectList fKnown; bigtime_t fTotalDuration; PlaylistWindow& fParent; diff --git a/src/apps/people/PeopleApp.cpp b/src/apps/people/PeopleApp.cpp index 39ef3354ed..33259c4e7f 100644 --- a/src/apps/people/PeopleApp.cpp +++ b/src/apps/people/PeopleApp.cpp @@ -72,7 +72,7 @@ TPeopleApp::TPeopleApp() : BApplication(APP_SIG), fWindowCount(0), - fAttributes(20, true) + fAttributes(20) { B_TRANSLATE_MARK_SYSTEM_NAME_VOID("People"); diff --git a/src/apps/people/PeopleApp.h b/src/apps/people/PeopleApp.h index c47880b509..a525a35266 100644 --- a/src/apps/people/PeopleApp.h +++ b/src/apps/people/PeopleApp.h @@ -60,7 +60,7 @@ private: BString name; }; - BObjectList fAttributes; + BObjectList fAttributes; }; #endif // PEOPLE_APP_H diff --git a/src/apps/people/PersonView.cpp b/src/apps/people/PersonView.cpp index 37ef4079c3..1396932ee7 100644 --- a/src/apps/people/PersonView.cpp +++ b/src/apps/people/PersonView.cpp @@ -47,7 +47,7 @@ PersonView::PersonView(const char* name, const char* categoryAttribute, BGridView(), fLastModificationTime(0), fGroups(NULL), - fControls(20, false), + fControls(20), fCategoryAttribute(categoryAttribute), fPictureView(NULL), fSaving(false) diff --git a/src/apps/terminal/Colors.cpp b/src/apps/terminal/Colors.cpp index 4c4d6f771d..26a779a64e 100644 --- a/src/apps/terminal/Colors.cpp +++ b/src/apps/terminal/Colors.cpp @@ -28,7 +28,7 @@ struct color_scheme gCustomColorScheme = { }; -BObjectList* gColorSchemes = NULL; +BObjectList* gColorSchemes = NULL; bool diff --git a/src/apps/terminal/Colors.h b/src/apps/terminal/Colors.h index 090efb8d1f..0665907fa9 100644 --- a/src/apps/terminal/Colors.h +++ b/src/apps/terminal/Colors.h @@ -56,7 +56,7 @@ struct FindColorSchemeByName : public UnaryPredicate { }; extern color_scheme gCustomColorScheme; -extern BObjectList *gColorSchemes; +extern BObjectList *gColorSchemes; const uint kANSIColorCount = 16; const uint kTermColorCount = 256; diff --git a/src/apps/terminal/PrefHandler.cpp b/src/apps/terminal/PrefHandler.cpp index e572996fc1..334da1ce92 100644 --- a/src/apps/terminal/PrefHandler.cpp +++ b/src/apps/terminal/PrefHandler.cpp @@ -270,7 +270,7 @@ SortByName(const color_scheme *lhs, const color_scheme *rhs) void PrefHandler::LoadThemes() { - gColorSchemes = new BObjectList(10, true); + gColorSchemes = new BObjectList(10); BStringList paths; diff --git a/src/apps/terminal/TerminalRoster.cpp b/src/apps/terminal/TerminalRoster.cpp index ec4e8ac6a3..a344b6d4ba 100644 --- a/src/apps/terminal/TerminalRoster.cpp +++ b/src/apps/terminal/TerminalRoster.cpp @@ -93,7 +93,7 @@ TerminalRoster::TerminalRoster() BHandler("terminal roster"), fLock("terminal roster"), fClipboard(TERM_SIGNATURE), - fInfos(10, true), + fInfos(10), fOurInfo(NULL), fLastCheckedTime(0), fListener(NULL), @@ -362,7 +362,7 @@ TerminalRoster::_UpdateInfos(bool checkApps) count = 0; // create an info list from the message - InfoList infos(10, true); + InfoList infos(10); for (int32 i = 0; i < count; i++) { // get the team's message BMessage teamData; diff --git a/src/apps/terminal/TerminalRoster.h b/src/apps/terminal/TerminalRoster.h index 26ad8a4034..77a6fea93a 100644 --- a/src/apps/terminal/TerminalRoster.h +++ b/src/apps/terminal/TerminalRoster.h @@ -76,7 +76,7 @@ private: virtual void MessageReceived(BMessage* message); private: - typedef BObjectList InfoList; + typedef BObjectList InfoList; private: status_t _UpdateInfos(bool checkApps); diff --git a/src/bin/cddb_lookup/cddb_lookup.cpp b/src/bin/cddb_lookup/cddb_lookup.cpp index 147e49e10f..5c8837ae46 100644 --- a/src/bin/cddb_lookup/cddb_lookup.cpp +++ b/src/bin/cddb_lookup/cddb_lookup.cpp @@ -130,7 +130,7 @@ CDDBLookup::Lookup(CDDBServer& server, const dev_t device, bool dumpOnly, printf("Looking up CD with CDDB Id %08" B_PRIx32 ".\n", cddbID); - BObjectList queryResponses(10, true); + QueryResponseList queryResponses(10); status_t result = server.Query(cddbID, toc, queryResponses); if (result != B_OK) { fprintf(stderr, "Error when querying CD: %s\n", strerror(result)); diff --git a/src/bin/cddb_lookup/cddb_server.h b/src/bin/cddb_lookup/cddb_server.h index ed0f9f3a7b..f5a8d9da4b 100644 --- a/src/bin/cddb_lookup/cddb_server.h +++ b/src/bin/cddb_lookup/cddb_server.h @@ -40,17 +40,17 @@ struct ReadResponseData { BString artist; BString genre; uint32 year; - BObjectList tracks; + BObjectList tracks; ReadResponseData() : - tracks(20, true) + tracks(20) { } }; -typedef BObjectList QueryResponseList; +typedef BObjectList QueryResponseList; class CDDBServer { diff --git a/src/bin/debug/profile/SharedImage.cpp b/src/bin/debug/profile/SharedImage.cpp index fd7b17b3b0..13c0e13c74 100644 --- a/src/bin/debug/profile/SharedImage.cpp +++ b/src/bin/debug/profile/SharedImage.cpp @@ -131,7 +131,7 @@ SharedImage::_Init(debug_symbol_iterator* iterator) return error; // iterate through the symbols - BObjectList symbols(512, true); + BObjectList symbols(512); char symbolName[1024]; int32 symbolType; void* symbolLocation; diff --git a/src/bin/debug/profile/Team.cpp b/src/bin/debug/profile/Team.cpp index 6ef8ab3160..48e8b3a3f9 100644 --- a/src/bin/debug/profile/Team.cpp +++ b/src/bin/debug/profile/Team.cpp @@ -37,7 +37,7 @@ Team::Team() fID(-1), fNubPort(-1), fThreads(), - fImages(20, false) + fImages(20) { fDebugContext.nub_port = -1; } diff --git a/src/bin/debug/profile/profile.cpp b/src/bin/debug/profile/profile.cpp index 91b7a14c15..4cc6de6c86 100644 --- a/src/bin/debug/profile/profile.cpp +++ b/src/bin/debug/profile/profile.cpp @@ -105,7 +105,7 @@ public: ThreadManager(port_id debuggerPort) : fTeams(20), - fThreads(20, true), + fThreads(20), fKernelTeam(NULL), fDebuggerPort(debuggerPort), fSummaryProfileResult(NULL) @@ -492,7 +492,7 @@ private: private: BObjectList fTeams; - BObjectList fThreads; + BObjectList fThreads; ImageMap fImages; Team* fKernelTeam; port_id fDebuggerPort; diff --git a/src/bin/package_repo/command_update.cpp b/src/bin/package_repo/command_update.cpp index e64818f838..527c334c51 100644 --- a/src/bin/package_repo/command_update.cpp +++ b/src/bin/package_repo/command_update.cpp @@ -59,9 +59,9 @@ namespace typedef std::map PackageInfos; -status_t +static status_t parsePackageListFile(const char* packageListFileName, - BObjectList* packageFileNames) + BObjectList* packageFileNames) { FILE* packageListFile = fopen(packageListFileName, "r"); if (packageListFile == NULL) { @@ -334,7 +334,7 @@ command_update(int argc, const char* const* argv) BEntry tempRepositoryFile(tempRepositoryFileName.String()); BPath targetRepositoryFilePath(targetRepositoryFileName); - BObjectList packageNames(100, true); + BObjectList packageNames(100); if ((result = parsePackageListFile(packageListFileName, &packageNames)) != B_OK) { listener.PrintError( diff --git a/src/bin/pkgman/Command.cpp b/src/bin/pkgman/Command.cpp index 274665078f..a8cc43e8a1 100644 --- a/src/bin/pkgman/Command.cpp +++ b/src/bin/pkgman/Command.cpp @@ -116,6 +116,6 @@ CommandManager::GetCommandsForCategory(const char* category, CommandManager::CommandManager() : - fCommands(20, true) + fCommands(20) { } diff --git a/src/bin/pkgman/Command.h b/src/bin/pkgman/Command.h index c6f2d5e9df..ca214b56e0 100644 --- a/src/bin/pkgman/Command.h +++ b/src/bin/pkgman/Command.h @@ -46,7 +46,7 @@ private: }; -typedef BObjectList CommandList; +typedef BObjectList CommandList; class CommandManager { diff --git a/src/bin/pkgman/command_resolve_dependencies.cpp b/src/bin/pkgman/command_resolve_dependencies.cpp index a90eb6f59c..8f85dd62ce 100644 --- a/src/bin/pkgman/command_resolve_dependencies.cpp +++ b/src/bin/pkgman/command_resolve_dependencies.cpp @@ -174,7 +174,7 @@ ResolveDependenciesCommand::Execute(int argc, const char* const* argv) // add repositories BPackagePathMap packagePaths; - BObjectList repositories(10, true); + BObjectList repositories(10); int32 repositoryIndex = 0; for (int i = 0; i < repositoryDirectoryCount; i++, repositoryIndex++) { const char* directoryPath = repositoryDirectories[i]; diff --git a/src/bin/pkgman/command_search.cpp b/src/bin/pkgman/command_search.cpp index 2f6e37eeec..db3a3b809b 100644 --- a/src/bin/pkgman/command_search.cpp +++ b/src/bin/pkgman/command_search.cpp @@ -154,7 +154,7 @@ filter_required_packages(const BPackageManager& packageManager, packagesSet.insert(package); - BObjectList requiresList + BObjectList requiresList = package->Info().RequiresList(); for (int32 j = 0; j < requiresList.CountItems(); j++) requirements.AppendSpecifier(requiresList.ItemAt(j)->ToString()); @@ -172,7 +172,7 @@ filter_required_packages(const BPackageManager& packageManager, std::set::const_iterator setIterator = packagesSet.begin(); for (; setIterator != packagesSet.end(); setIterator++) { BSolverPackage* package = *setIterator; - BObjectList requiresList + BObjectList requiresList = package->Info().RequiresList(); for (int32 j = 0; j < requiresList.CountItems(); j++) { if (requiresList.ItemAt(j)->ToString() != unmatched->SelectString()) diff --git a/src/build/libbe/storage/MergedDirectory.cpp b/src/build/libbe/storage/MergedDirectory.cpp index b48d3ba4db..7107cd72c1 100644 --- a/src/build/libbe/storage/MergedDirectory.cpp +++ b/src/build/libbe/storage/MergedDirectory.cpp @@ -29,7 +29,7 @@ struct BMergedDirectory::EntryNameSet : std::set { BMergedDirectory::BMergedDirectory(BPolicy policy) : BEntryList(), - fDirectories(10, true), + fDirectories(10), fPolicy(policy), fDirectoryIndex(0), fVisitedEntries(NULL) diff --git a/src/kits/debugger/controllers/DebugReportGenerator.cpp b/src/kits/debugger/controllers/DebugReportGenerator.cpp index 3ec749d4d0..66c1f32b5d 100644 --- a/src/kits/debugger/controllers/DebugReportGenerator.cpp +++ b/src/kits/debugger/controllers/DebugReportGenerator.cpp @@ -367,7 +367,7 @@ DebugReportGenerator::_DumpLoadedImages(BFile& _output) status_t DebugReportGenerator::_DumpAreas(BFile& _output) { - BObjectList areas(20, true); + BObjectList areas(20); status_t result = fDebuggerInterface->GetAreaInfos(areas); if (result != B_OK) return result; @@ -413,7 +413,7 @@ DebugReportGenerator::_DumpAreas(BFile& _output) status_t DebugReportGenerator::_DumpSemaphores(BFile& _output) { - BObjectList semaphores(20, true); + BObjectList semaphores(20); status_t error = fDebuggerInterface->GetSemaphoreInfos(semaphores); if (error != B_OK) return error; diff --git a/src/kits/debugger/controllers/TeamDebugger.cpp b/src/kits/debugger/controllers/TeamDebugger.cpp index 61465ee8e0..3f049e92ce 100644 --- a/src/kits/debugger/controllers/TeamDebugger.cpp +++ b/src/kits/debugger/controllers/TeamDebugger.cpp @@ -470,7 +470,7 @@ TeamDebugger::Init(DebuggerInterface* interface, thread_id threadID, int argc, ThreadHandler* mainThreadHandler = NULL; { - BObjectList threadInfos(20, true); + BObjectList threadInfos(20); status_t error = fDebuggerInterface->GetThreadInfos(threadInfos); for (int32 i = 0; ThreadInfo* info = threadInfos.ItemAt(i); i++) { ::Thread* thread; @@ -494,7 +494,7 @@ TeamDebugger::Init(DebuggerInterface* interface, thread_id threadID, int argc, Image* appImage = NULL; { - BObjectList imageInfos(20, true); + BObjectList imageInfos(20); status_t error = fDebuggerInterface->GetImageInfos(imageInfos); for (int32 i = 0; ImageInfo* info = imageInfos.ItemAt(i); i++) { Image* image; @@ -1922,7 +1922,7 @@ TeamDebugger::_PrepareForTeamExec(TeamExecEvent* event) fBreakpointManager->RemoveImageBreakpoints(image); } - BObjectList breakpointsToRemove(20, false); + BObjectList breakpointsToRemove(20); const UserBreakpointList& breakpoints = fTeam->UserBreakpoints(); for (UserBreakpointList::ConstIterator it = breakpoints.GetIterator(); UserBreakpoint* breakpoint = it.Next();) { diff --git a/src/kits/debugger/debug_info/DebuggerImageDebugInfo.cpp b/src/kits/debugger/debug_info/DebuggerImageDebugInfo.cpp index 07a6fe7932..d75eb8adf2 100644 --- a/src/kits/debugger/debug_info/DebuggerImageDebugInfo.cpp +++ b/src/kits/debugger/debug_info/DebuggerImageDebugInfo.cpp @@ -43,7 +43,7 @@ DebuggerImageDebugInfo::Init() status_t -DebuggerImageDebugInfo::GetFunctions(const BObjectList& symbols, +DebuggerImageDebugInfo::GetFunctions(const BObjectList& symbols, BObjectList& functions) { return SpecificImageDebugInfo::GetFunctionsFromSymbols(symbols, functions, diff --git a/src/kits/debugger/debug_info/DebuggerImageDebugInfo.h b/src/kits/debugger/debug_info/DebuggerImageDebugInfo.h index fcc395d16c..d233398937 100644 --- a/src/kits/debugger/debug_info/DebuggerImageDebugInfo.h +++ b/src/kits/debugger/debug_info/DebuggerImageDebugInfo.h @@ -27,7 +27,7 @@ public: status_t Init(); virtual status_t GetFunctions( - const BObjectList& symbols, + const BObjectList& symbols, BObjectList& functions); virtual status_t GetType(GlobalTypeCache* cache, const BString& name, diff --git a/src/kits/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/kits/debugger/debug_info/DwarfImageDebugInfo.cpp index 5280de93f2..5d56f32227 100644 --- a/src/kits/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/kits/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -266,7 +266,7 @@ struct DwarfImageDebugInfo::TypeNameEntry : TypeNameKey { TypeNameEntry(const BString& name) : TypeNameKey(name), - types(10, true) + types(10) { } @@ -401,7 +401,7 @@ DwarfImageDebugInfo::Init() status_t -DwarfImageDebugInfo::GetFunctions(const BObjectList& symbols, +DwarfImageDebugInfo::GetFunctions(const BObjectList& symbols, BObjectList& functions) { TRACE_IMAGES("DwarfImageDebugInfo::GetFunctions()\n"); diff --git a/src/kits/debugger/debug_info/DwarfImageDebugInfo.h b/src/kits/debugger/debug_info/DwarfImageDebugInfo.h index 66d481154f..9e0ab30545 100644 --- a/src/kits/debugger/debug_info/DwarfImageDebugInfo.h +++ b/src/kits/debugger/debug_info/DwarfImageDebugInfo.h @@ -56,7 +56,7 @@ public: { return fRelocationDelta; } virtual status_t GetFunctions( - const BObjectList& symbols, + const BObjectList& symbols, BObjectList& functions); virtual status_t GetType(GlobalTypeCache* cache, const BString& name, @@ -105,7 +105,7 @@ private: TypeNameTable; struct TypeEntryInfo; - typedef BObjectList TypeEntryList; + typedef BObjectList TypeEntryList; private: status_t _AddSourceCodeInfo(CompilationUnit* unit, diff --git a/src/kits/debugger/debug_info/ImageDebugInfo.cpp b/src/kits/debugger/debug_info/ImageDebugInfo.cpp index 88f6cde123..50ead5786d 100644 --- a/src/kits/debugger/debug_info/ImageDebugInfo.cpp +++ b/src/kits/debugger/debug_info/ImageDebugInfo.cpp @@ -46,7 +46,7 @@ ImageDebugInfo::AddSpecificInfo(SpecificImageDebugInfo* info) status_t ImageDebugInfo::FinishInit(DebuggerInterface* interface) { - BObjectList symbols(50, true); + BObjectList symbols(50); status_t error = interface->GetSymbolInfos(fImageInfo.TeamID(), fImageInfo.ImageID(), symbols); if (error != B_OK) diff --git a/src/kits/debugger/debug_info/ImageDebugLoadingStateHandlerRoster.cpp b/src/kits/debugger/debug_info/ImageDebugLoadingStateHandlerRoster.cpp index 26fa2329e6..292b6ad28d 100644 --- a/src/kits/debugger/debug_info/ImageDebugLoadingStateHandlerRoster.cpp +++ b/src/kits/debugger/debug_info/ImageDebugLoadingStateHandlerRoster.cpp @@ -24,7 +24,7 @@ ImageDebugLoadingStateHandlerRoster::ImageDebugLoadingStateHandlerRoster() : fLock("loading state handler roster"), - fStateHandlers(20, false) + fStateHandlers(20) { } diff --git a/src/kits/debugger/debug_info/SpecificImageDebugInfo.cpp b/src/kits/debugger/debug_info/SpecificImageDebugInfo.cpp index 0be04e63fd..9f6530e5c6 100644 --- a/src/kits/debugger/debug_info/SpecificImageDebugInfo.cpp +++ b/src/kits/debugger/debug_info/SpecificImageDebugInfo.cpp @@ -20,7 +20,7 @@ SpecificImageDebugInfo::~SpecificImageDebugInfo() /*static*/ status_t SpecificImageDebugInfo::GetFunctionsFromSymbols( - const BObjectList& symbols, + const BObjectList& symbols, BObjectList& functions, DebuggerInterface* interface, const ImageInfo& imageInfo, SpecificImageDebugInfo* info) { diff --git a/src/kits/debugger/debug_info/TeamDebugInfo.cpp b/src/kits/debugger/debug_info/TeamDebugInfo.cpp index a8ed610a0c..b4e85f8f09 100644 --- a/src/kits/debugger/debug_info/TeamDebugInfo.cpp +++ b/src/kits/debugger/debug_info/TeamDebugInfo.cpp @@ -264,7 +264,7 @@ TeamDebugInfo::TeamDebugInfo(DebuggerInterface* debuggerInterface, fDebuggerInterface(debuggerInterface), fArchitecture(architecture), fFileManager(fileManager), - fSpecificInfos(10, true), + fSpecificInfos(10), fFunctions(NULL), fSourceFiles(NULL), fTypeCache(NULL), diff --git a/src/kits/debugger/debugger_interface/DebuggerInterface.cpp b/src/kits/debugger/debugger_interface/DebuggerInterface.cpp index 41e5edd808..03b9b93c25 100644 --- a/src/kits/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/kits/debugger/debugger_interface/DebuggerInterface.cpp @@ -81,7 +81,7 @@ DebuggerInterface::IsPostMortem() const status_t DebuggerInterface::GetElfSymbols(const char* filePath, int64 textDelta, - BObjectList& infos) + BObjectList& infos) { // open the ELF file ElfFile elfFile; @@ -106,7 +106,7 @@ status_t DebuggerInterface::GetElfSymbols(const void* symbolTable, uint32 symbolCount, uint32 symbolTableEntrySize, const char* stringTable, uint32 stringTableSize, bool is64Bit, bool swappedByteOrder, - int64 textDelta, BObjectList& infos) + int64 textDelta, BObjectList& infos) { size_t symbolTableSize = symbolCount * symbolTableEntrySize; SymbolTableLookupSource* source = new(std::nothrow) SymbolTableLookupSource( @@ -131,7 +131,7 @@ DebuggerInterface::GetElfSymbols(const void* symbolTable, uint32 symbolCount, status_t DebuggerInterface::GetElfSymbols(ElfSymbolLookup* symbolLookup, - BObjectList& infos) + BObjectList& infos) { SymbolInfo symbolInfo; uint32 index = 0; diff --git a/src/kits/debugger/debugger_interface/DebuggerInterface.h b/src/kits/debugger/debugger_interface/DebuggerInterface.h index 22cc0afd22..b58157c6c0 100644 --- a/src/kits/debugger/debugger_interface/DebuggerInterface.h +++ b/src/kits/debugger/debugger_interface/DebuggerInterface.h @@ -64,18 +64,18 @@ public: virtual status_t GetSystemInfo(SystemInfo& info) = 0; virtual status_t GetTeamInfo(TeamInfo& info) = 0; - virtual status_t GetThreadInfos(BObjectList& infos) + virtual status_t GetThreadInfos(BObjectList& infos) = 0; - virtual status_t GetImageInfos(BObjectList& infos) + virtual status_t GetImageInfos(BObjectList& infos) = 0; - virtual status_t GetAreaInfos(BObjectList& infos) + virtual status_t GetAreaInfos(BObjectList& infos) = 0; virtual status_t GetSemaphoreInfos( - BObjectList& infos) + BObjectList& infos) = 0; virtual status_t GetSymbolInfos(team_id team, image_id image, - BObjectList& infos) = 0; + BObjectList& infos) = 0; virtual status_t GetSymbolInfo(team_id team, image_id image, const char* name, int32 symbolType, SymbolInfo& info) = 0; @@ -104,16 +104,16 @@ public: protected: status_t GetElfSymbols(const char* filePath, int64 textDelta, - BObjectList& infos); + BObjectList& infos); status_t GetElfSymbols(const void* symbolTable, uint32 symbolCount, uint32 symbolTableEntrySize, const char* stringTable, uint32 stringTableSize, bool is64Bit, bool swappedByteOrder, int64 textDelta, - BObjectList& infos); + BObjectList& infos); status_t GetElfSymbols(ElfSymbolLookup* symbolLookup, - BObjectList& infos); + BObjectList& infos); private: struct SymbolTableLookupSource; diff --git a/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.cpp b/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.cpp index 465d383ba3..3f3f3916ec 100644 --- a/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.cpp +++ b/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.cpp @@ -179,7 +179,7 @@ CoreFileDebuggerInterface::GetTeamInfo(TeamInfo& info) status_t -CoreFileDebuggerInterface::GetThreadInfos(BObjectList& infos) +CoreFileDebuggerInterface::GetThreadInfos(BObjectList& infos) { int32 count = fCoreFile->CountThreadInfos(); for (int32 i = 0; i < count; i++) { @@ -198,7 +198,7 @@ CoreFileDebuggerInterface::GetThreadInfos(BObjectList& infos) status_t -CoreFileDebuggerInterface::GetImageInfos(BObjectList& infos) +CoreFileDebuggerInterface::GetImageInfos(BObjectList& infos) { int32 count = fCoreFile->CountImageInfos(); for (int32 i = 0; i < count; i++) { @@ -219,14 +219,14 @@ CoreFileDebuggerInterface::GetImageInfos(BObjectList& infos) status_t -CoreFileDebuggerInterface::GetAreaInfos(BObjectList& infos) +CoreFileDebuggerInterface::GetAreaInfos(BObjectList& infos) { return B_UNSUPPORTED; } status_t -CoreFileDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) +CoreFileDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) { return B_UNSUPPORTED; } @@ -234,7 +234,7 @@ CoreFileDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) status_t CoreFileDebuggerInterface::GetSymbolInfos(team_id team, image_id image, - BObjectList& infos) + BObjectList& infos) { // get the image info const CoreFileImageInfo* imageInfo = fCoreFile->ImageInfoForId(image); diff --git a/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.h b/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.h index 26263ceb17..f95c05e3d9 100644 --- a/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.h +++ b/src/kits/debugger/debugger_interface/core/CoreFileDebuggerInterface.h @@ -49,13 +49,13 @@ public: virtual status_t GetSystemInfo(SystemInfo& info); virtual status_t GetTeamInfo(TeamInfo& info); - virtual status_t GetThreadInfos(BObjectList& infos); - virtual status_t GetImageInfos(BObjectList& infos); - virtual status_t GetAreaInfos(BObjectList& infos); + virtual status_t GetThreadInfos(BObjectList& infos); + virtual status_t GetImageInfos(BObjectList& infos); + virtual status_t GetAreaInfos(BObjectList& infos); virtual status_t GetSemaphoreInfos( - BObjectList& infos); + BObjectList& infos); virtual status_t GetSymbolInfos(team_id team, image_id image, - BObjectList& infos); + BObjectList& infos); virtual status_t GetSymbolInfo(team_id team, image_id image, const char* name, int32 symbolType, SymbolInfo& info); diff --git a/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.cpp b/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.cpp index f3660e37fc..a336b793f4 100644 --- a/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.cpp +++ b/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.cpp @@ -526,7 +526,7 @@ LocalDebuggerInterface::GetTeamInfo(TeamInfo& info) status_t -LocalDebuggerInterface::GetThreadInfos(BObjectList& infos) +LocalDebuggerInterface::GetThreadInfos(BObjectList& infos) { thread_info threadInfo; int32 cookie = 0; @@ -544,7 +544,7 @@ LocalDebuggerInterface::GetThreadInfos(BObjectList& infos) status_t -LocalDebuggerInterface::GetImageInfos(BObjectList& infos) +LocalDebuggerInterface::GetImageInfos(BObjectList& infos) { // get the team's images image_info imageInfo; @@ -564,7 +564,7 @@ LocalDebuggerInterface::GetImageInfos(BObjectList& infos) status_t -LocalDebuggerInterface::GetAreaInfos(BObjectList& infos) +LocalDebuggerInterface::GetAreaInfos(BObjectList& infos) { // get the team's areas area_info areaInfo; @@ -584,7 +584,7 @@ LocalDebuggerInterface::GetAreaInfos(BObjectList& infos) status_t -LocalDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) +LocalDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) { // get the team's semaphores sem_info semInfo; @@ -604,7 +604,7 @@ LocalDebuggerInterface::GetSemaphoreInfos(BObjectList& infos) status_t LocalDebuggerInterface::GetSymbolInfos(team_id team, image_id image, - BObjectList& infos) + BObjectList& infos) { DebugContextGetter contextGetter(fDebugContextPool); diff --git a/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.h b/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.h index 468d4e2bd9..18e2c5becd 100644 --- a/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.h +++ b/src/kits/debugger/debugger_interface/local/LocalDebuggerInterface.h @@ -40,13 +40,13 @@ public: virtual status_t GetSystemInfo(SystemInfo& info); virtual status_t GetTeamInfo(TeamInfo& info); - virtual status_t GetThreadInfos(BObjectList& infos); - virtual status_t GetImageInfos(BObjectList& infos); - virtual status_t GetAreaInfos(BObjectList& infos); + virtual status_t GetThreadInfos(BObjectList& infos); + virtual status_t GetImageInfos(BObjectList& infos); + virtual status_t GetAreaInfos(BObjectList& infos); virtual status_t GetSemaphoreInfos( - BObjectList& infos); + BObjectList& infos); virtual status_t GetSymbolInfos(team_id team, image_id image, - BObjectList& infos); + BObjectList& infos); virtual status_t GetSymbolInfo(team_id team, image_id image, const char* name, int32 symbolType, SymbolInfo& info); diff --git a/src/kits/debugger/dwarf/CfaContext.cpp b/src/kits/debugger/dwarf/CfaContext.cpp index d4d13a111e..7e462aedfd 100644 --- a/src/kits/debugger/dwarf/CfaContext.cpp +++ b/src/kits/debugger/dwarf/CfaContext.cpp @@ -18,7 +18,7 @@ CfaContext::CfaContext() fReturnAddressRegister(0), fRuleSet(NULL), fInitialRuleSet(NULL), - fRuleSetStack(10, true) + fRuleSetStack(10) { } diff --git a/src/kits/debugger/dwarf/CfaContext.h b/src/kits/debugger/dwarf/CfaContext.h index 78d224cbd2..3be7df9a94 100644 --- a/src/kits/debugger/dwarf/CfaContext.h +++ b/src/kits/debugger/dwarf/CfaContext.h @@ -53,7 +53,7 @@ public: void RestoreRegisterRule(uint32 reg); private: - typedef BObjectList RuleSetList; + typedef BObjectList RuleSetList; private: target_addr_t fTargetLocation; diff --git a/src/kits/debugger/dwarf/CompilationUnit.cpp b/src/kits/debugger/dwarf/CompilationUnit.cpp index 4c7c19287d..712a29bc65 100644 --- a/src/kits/debugger/dwarf/CompilationUnit.cpp +++ b/src/kits/debugger/dwarf/CompilationUnit.cpp @@ -35,8 +35,8 @@ CompilationUnit::CompilationUnit(off_t headerOffset, off_t contentOffset, addressSize, isBigEndian, isDwarf64), fUnitEntry(NULL), fAddressRanges(NULL), - fDirectories(10, true), - fFiles(10, true), + fDirectories(10), + fFiles(10), fLineNumberProgram(addressSize, isBigEndian) { } diff --git a/src/kits/debugger/dwarf/CompilationUnit.h b/src/kits/debugger/dwarf/CompilationUnit.h index a939485805..df7310f612 100644 --- a/src/kits/debugger/dwarf/CompilationUnit.h +++ b/src/kits/debugger/dwarf/CompilationUnit.h @@ -56,8 +56,8 @@ public: private: struct File; - typedef BObjectList DirectoryList; - typedef BObjectList FileList; + typedef BObjectList DirectoryList; + typedef BObjectList FileList; private: DIECompileUnitBase* fUnitEntry; diff --git a/src/kits/debugger/dwarf/DwarfFile.cpp b/src/kits/debugger/dwarf/DwarfFile.cpp index 90ea41a376..3600fec3f3 100644 --- a/src/kits/debugger/dwarf/DwarfFile.cpp +++ b/src/kits/debugger/dwarf/DwarfFile.cpp @@ -503,10 +503,10 @@ DwarfFile::DwarfFile() fDebugLocationSection(NULL), fDebugPublicTypesSection(NULL), fDebugTypesSection(NULL), - fCompilationUnits(20, true), + fCompilationUnits(20), fTypeUnits(), - fDebugFrameInfos(100, true), - fEHFrameInfos(100, true), + fDebugFrameInfos(100), + fEHFrameInfos(100), fTypesSectionRequired(false), fFinished(false), fItaniumEHFrameFormat(false), diff --git a/src/kits/debugger/dwarf/DwarfFile.h b/src/kits/debugger/dwarf/DwarfFile.h index 4c0b71cc65..b98db580c2 100644 --- a/src/kits/debugger/dwarf/DwarfFile.h +++ b/src/kits/debugger/dwarf/DwarfFile.h @@ -113,9 +113,9 @@ private: struct FDELookupInfo; typedef DoublyLinkedList AbbreviationTableList; - typedef BObjectList CompilationUnitList; + typedef BObjectList CompilationUnitList; typedef BOpenHashTable TypeUnitTable; - typedef BObjectList FDEInfoList; + typedef BObjectList FDEInfoList; private: status_t _ParseDebugInfoSection(uint8 _addressSize, bool isBigEndian); diff --git a/src/kits/debugger/elf/CoreFile.cpp b/src/kits/debugger/elf/CoreFile.cpp index ae06ed2076..e330bde9b0 100644 --- a/src/kits/debugger/elf/CoreFile.cpp +++ b/src/kits/debugger/elf/CoreFile.cpp @@ -201,9 +201,9 @@ CoreFile::CoreFile() : fElfFile(), fTeamInfo(), - fAreaInfos(32, true), - fImageInfos(32, true), - fThreadInfos(32, true) + fAreaInfos(32), + fImageInfos(32), + fThreadInfos(32) { } diff --git a/src/kits/debugger/elf/CoreFile.h b/src/kits/debugger/elf/CoreFile.h index 14b2e1a550..79ff79f223 100644 --- a/src/kits/debugger/elf/CoreFile.h +++ b/src/kits/debugger/elf/CoreFile.h @@ -201,9 +201,9 @@ public: ElfSymbolLookup*& _lookup); private: - typedef BObjectList AreaInfoList; - typedef BObjectList ImageInfoList; - typedef BObjectList ThreadInfoList; + typedef BObjectList AreaInfoList; + typedef BObjectList ImageInfoList; + typedef BObjectList ThreadInfoList; private: template diff --git a/src/kits/debugger/elf/ElfFile.cpp b/src/kits/debugger/elf/ElfFile.cpp index d375659788..23adb51c15 100644 --- a/src/kits/debugger/elf/ElfFile.cpp +++ b/src/kits/debugger/elf/ElfFile.cpp @@ -113,7 +113,7 @@ struct ElfFile::SymbolLookupSource : public ElfSymbolLookupSource { SymbolLookupSource(int fd) : fFd(fd), - fSegments(8, true) + fSegments(8) { } @@ -169,8 +169,8 @@ private: }; private: - int fFd; - BObjectList fSegments; + int fFd; + BObjectList fSegments; }; @@ -185,8 +185,8 @@ ElfFile::ElfFile() fMachine(EM_NONE), f64Bit(false), fSwappedByteOrder(false), - fSections(16, true), - fSegments(16, true) + fSections(16), + fSegments(16) { } diff --git a/src/kits/debugger/model/DisassembledCode.cpp b/src/kits/debugger/model/DisassembledCode.cpp index f2c3e8b813..59f07eafeb 100644 --- a/src/kits/debugger/model/DisassembledCode.cpp +++ b/src/kits/debugger/model/DisassembledCode.cpp @@ -33,7 +33,7 @@ struct DisassembledCode::Line { DisassembledCode::DisassembledCode(SourceLanguage* language) : fLanguage(language), - fLines(20, true) + fLines(20) { fLanguage->AcquireReference(); } diff --git a/src/kits/debugger/model/TypeComponentPath.cpp b/src/kits/debugger/model/TypeComponentPath.cpp index 50c82d48bb..0cde6176e9 100644 --- a/src/kits/debugger/model/TypeComponentPath.cpp +++ b/src/kits/debugger/model/TypeComponentPath.cpp @@ -107,14 +107,14 @@ TypeComponent::operator==(const TypeComponent& other) const TypeComponentPath::TypeComponentPath() : - fComponents(10, true) + fComponents(10) { } TypeComponentPath::TypeComponentPath(const TypeComponentPath& other) : - fComponents(10, true) + fComponents(10) { *this = other; } diff --git a/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.cpp b/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.cpp index 7ad0a5102d..7a2055f4dd 100644 --- a/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.cpp +++ b/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.cpp @@ -128,7 +128,7 @@ public: LineInfo(int32 line) : fLine(line), - fPairs(5, true) + fPairs(5) { } @@ -157,7 +157,7 @@ public: } private: - typedef BObjectList SyntaxPairList; + typedef BObjectList SyntaxPairList; private: int32 fLine; @@ -176,7 +176,7 @@ CLanguageFamilySyntaxHighlightInfo::CLanguageFamilySyntaxHighlightInfo( fHighlightSource(source), fTokenizer(tokenizer), fTypeInfo(typeInfo), - fLineInfos(10, true) + fLineInfos(10) { fHighlightSource->AcquireReference(); } diff --git a/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.h b/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.h index c8c900871a..af79c82456 100644 --- a/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.h +++ b/src/kits/debugger/source_language/c_family/CLanguageFamilySyntaxHighlightInfo.h @@ -34,7 +34,7 @@ public: private: class LineInfo; - typedef BObjectList LineInfoList; + typedef BObjectList LineInfoList; struct SyntaxPair; private: diff --git a/src/kits/debugger/target_host_interface/TargetHostInterface.cpp b/src/kits/debugger/target_host_interface/TargetHostInterface.cpp index 85b3d09d1b..4443d2b55b 100644 --- a/src/kits/debugger/target_host_interface/TargetHostInterface.cpp +++ b/src/kits/debugger/target_host_interface/TargetHostInterface.cpp @@ -38,7 +38,7 @@ TargetHostInterface::TargetHostInterface() : BLooper(), fListeners(), - fTeamDebuggers(20, false) + fTeamDebuggers(20) { } diff --git a/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp b/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp index 6851fa635a..fa56d5815c 100644 --- a/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp +++ b/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp @@ -23,8 +23,8 @@ TargetHostInterfaceRoster::TargetHostInterfaceRoster() TargetHostInterface::Listener(), fLock(), fRunningTeamDebuggers(0), - fInterfaceInfos(20, false), - fActiveInterfaces(20, false), + fInterfaceInfos(20), + fActiveInterfaces(20), fListener(NULL) { } diff --git a/src/kits/debugger/util/RangeList.cpp b/src/kits/debugger/util/RangeList.cpp index 8ab7f80bac..7bb1af1cd8 100644 --- a/src/kits/debugger/util/RangeList.cpp +++ b/src/kits/debugger/util/RangeList.cpp @@ -10,7 +10,8 @@ RangeList::RangeList() - : BObjectList(20, true) + : + BObjectList(20) { } diff --git a/src/kits/debugger/value/TypeHandlerRoster.cpp b/src/kits/debugger/value/TypeHandlerRoster.cpp index 718dacbeca..fa5c4132e2 100644 --- a/src/kits/debugger/value/TypeHandlerRoster.cpp +++ b/src/kits/debugger/value/TypeHandlerRoster.cpp @@ -224,7 +224,7 @@ TypeHandlerRoster::FindTypeHandlers(ValueNodeChild* nodeChild, Type* type, // find the best-supporting handler AutoLocker locker(fLock); - TypeHandlerList* handlers = new(std::nothrow) TypeHandlerList(10, false); + TypeHandlerList* handlers = new(std::nothrow) TypeHandlerList(10); ObjectDeleter listDeleter(handlers); if (handlers == NULL) return B_NO_MEMORY; diff --git a/src/kits/debugger/value/ValueNodeContainer.cpp b/src/kits/debugger/value/ValueNodeContainer.cpp index 4528540ecb..68ce14d987 100644 --- a/src/kits/debugger/value/ValueNodeContainer.cpp +++ b/src/kits/debugger/value/ValueNodeContainer.cpp @@ -17,8 +17,8 @@ ValueNodeContainer::ValueNodeContainer() : fLock("value node container"), - fChildren(20, false), - fListeners(20, false) + fChildren(20), + fListeners(20) { } diff --git a/src/kits/interface/Icon.cpp b/src/kits/interface/Icon.cpp index 9af535a2c2..c53e88de8f 100644 --- a/src/kits/interface/Icon.cpp +++ b/src/kits/interface/Icon.cpp @@ -24,8 +24,8 @@ namespace BPrivate { BIcon::BIcon() : - fEnabledBitmaps(8, true), - fDisabledBitmaps(8, true) + fEnabledBitmaps(8), + fDisabledBitmaps(8) { } diff --git a/src/kits/interface/PrivateScreen.cpp b/src/kits/interface/PrivateScreen.cpp index 8324af1840..f556c8eaf8 100644 --- a/src/kits/interface/PrivateScreen.cpp +++ b/src/kits/interface/PrivateScreen.cpp @@ -41,11 +41,11 @@ using namespace BPrivate; namespace { struct Screens { - BObjectList list; + BObjectList list; Screens() : - list(2, true), + list(2), fLock("screen list") { } diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index e3f58e5b31..07e64f8f9e 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -373,7 +373,7 @@ struct BView::LayoutData { fLayoutInvalidationDisabled(0), fLayout(NULL), fLayoutContext(NULL), - fLayoutItems(5, false), + fLayoutItems(5), fLayoutValid(true), // TODO: Rethink these initial values! fMinMaxValid(true), // fLayoutInProgress(false), diff --git a/src/kits/interface/layouter/CollapsingLayouter.cpp b/src/kits/interface/layouter/CollapsingLayouter.cpp index d070d11365..7f4c884353 100644 --- a/src/kits/interface/layouter/CollapsingLayouter.cpp +++ b/src/kits/interface/layouter/CollapsingLayouter.cpp @@ -85,14 +85,14 @@ struct CollapsingLayouter::ElementInfo { float weight; int32 position; bool valid; - BObjectList constraints; + BObjectList constraints; ElementInfo() : weight(0), position(-1), valid(false), - constraints(5, true) + constraints(5) { } diff --git a/src/kits/mail/MailSettings.cpp b/src/kits/mail/MailSettings.cpp index 52cabe4ff5..f0887d5476 100644 --- a/src/kits/mail/MailSettings.cpp +++ b/src/kits/mail/MailSettings.cpp @@ -527,7 +527,7 @@ BMailAddOnSettings::_RelativizePath(const BPath& path) const BMailProtocolSettings::BMailProtocolSettings() : - fFiltersSettings(5, true) + fFiltersSettings(5) { } diff --git a/src/kits/network/libnetapi/NetworkInterface.cpp b/src/kits/network/libnetapi/NetworkInterface.cpp index 8c61e775ae..2227ce2756 100644 --- a/src/kits/network/libnetapi/NetworkInterface.cpp +++ b/src/kits/network/libnetapi/NetworkInterface.cpp @@ -540,7 +540,7 @@ BNetworkInterface::RemoveDefaultRoute(int family) status_t BNetworkInterface::GetRoutes(int family, - BObjectList& routes) const + BObjectList& routes) const { return BNetworkRoute::GetRoutes(family, Name(), routes); } diff --git a/src/kits/network/libnetapi/NetworkRoute.cpp b/src/kits/network/libnetapi/NetworkRoute.cpp index 6ebe6a55fe..d3ad02494f 100644 --- a/src/kits/network/libnetapi/NetworkRoute.cpp +++ b/src/kits/network/libnetapi/NetworkRoute.cpp @@ -206,7 +206,7 @@ status_t BNetworkRoute::GetDefaultRoute(int family, const char* interfaceName, BNetworkRoute& route) { - BObjectList routes(1, true); + BObjectList routes(1); status_t result = GetRoutes(family, interfaceName, RTF_DEFAULT, routes); if (result != B_OK) return result; @@ -238,7 +238,7 @@ BNetworkRoute::GetDefaultGateway(int family, const char* interfaceName, status_t -BNetworkRoute::GetRoutes(int family, BObjectList& routes) +BNetworkRoute::GetRoutes(int family, BObjectList& routes) { return GetRoutes(family, NULL, 0, routes); } @@ -246,7 +246,7 @@ BNetworkRoute::GetRoutes(int family, BObjectList& routes) status_t BNetworkRoute::GetRoutes(int family, const char* interfaceName, - BObjectList& routes) + BObjectList& routes) { return GetRoutes(family, interfaceName, 0, routes); } @@ -254,7 +254,7 @@ BNetworkRoute::GetRoutes(int family, const char* interfaceName, status_t BNetworkRoute::GetRoutes(int family, const char* interfaceName, - uint32 filterFlags, BObjectList& routes) + uint32 filterFlags, BObjectList& routes) { FileDescriptorCloser socket(::socket(family, SOCK_DGRAM, 0)); if (!socket.IsSet()) diff --git a/src/kits/network/libnetservices/UrlContext.cpp b/src/kits/network/libnetservices/UrlContext.cpp index ce6e5db17c..21ab8b20e7 100644 --- a/src/kits/network/libnetservices/UrlContext.cpp +++ b/src/kits/network/libnetservices/UrlContext.cpp @@ -26,7 +26,7 @@ BUrlContext::BUrlContext() : fCookieJar(), fAuthenticationMap(NULL), - fCertificates(20, true), + fCertificates(20), fProxyHost(), fProxyPort(0) { diff --git a/src/kits/package/CommitTransactionResult.cpp b/src/kits/package/CommitTransactionResult.cpp index 2b4bbfb5df..7297527f93 100644 --- a/src/kits/package/CommitTransactionResult.cpp +++ b/src/kits/package/CommitTransactionResult.cpp @@ -254,7 +254,7 @@ BCommitTransactionResult::BCommitTransactionResult() fString1(), fString2(), fOldStateDirectory(), - fIssues(10, true) + fIssues(10) { } @@ -269,7 +269,7 @@ BCommitTransactionResult::BCommitTransactionResult(BTransactionError error) fString1(), fString2(), fOldStateDirectory(), - fIssues(10, true) + fIssues(10) { } @@ -285,7 +285,7 @@ BCommitTransactionResult::BCommitTransactionResult( fString1(), fString2(), fOldStateDirectory(), - fIssues(10, true) + fIssues(10) { *this = other; } diff --git a/src/kits/package/PackageInfo.cpp b/src/kits/package/PackageInfo.cpp index 2982662338..f0bfdffb8e 100644 --- a/src/kits/package/PackageInfo.cpp +++ b/src/kits/package/PackageInfo.cpp @@ -176,17 +176,17 @@ BPackageInfo::BPackageInfo() fLicenseList(4), fURLList(4), fSourceURLList(4), - fGlobalWritableFileInfos(4, true), - fUserSettingsFileInfos(4, true), - fUsers(4, true), + fGlobalWritableFileInfos(4), + fUserSettingsFileInfos(4), + fUsers(4), fGroups(4), fPostInstallScripts(4), fPreUninstallScripts(4), - fProvidesList(20, true), - fRequiresList(20, true), - fSupplementsList(20, true), - fConflictsList(4, true), - fFreshensList(4, true), + fProvidesList(20), + fRequiresList(20), + fSupplementsList(20), + fConflictsList(4), + fFreshensList(4), fReplacesList(4) { } @@ -201,17 +201,17 @@ BPackageInfo::BPackageInfo(BMessage* archive, status_t* _error) fLicenseList(4), fURLList(4), fSourceURLList(4), - fGlobalWritableFileInfos(4, true), - fUserSettingsFileInfos(4, true), - fUsers(4, true), + fGlobalWritableFileInfos(4), + fUserSettingsFileInfos(4), + fUsers(4), fGroups(4), fPostInstallScripts(4), fPreUninstallScripts(4), - fProvidesList(20, true), - fRequiresList(20, true), - fSupplementsList(20, true), - fConflictsList(4, true), - fFreshensList(4, true), + fProvidesList(20), + fRequiresList(20), + fSupplementsList(20), + fConflictsList(4), + fFreshensList(4), fReplacesList(4) { status_t error; @@ -524,21 +524,21 @@ BPackageInfo::SourceURLList() const } -const BObjectList& +const BObjectList& BPackageInfo::GlobalWritableFileInfos() const { return fGlobalWritableFileInfos; } -const BObjectList& +const BObjectList& BPackageInfo::UserSettingsFileInfos() const { return fUserSettingsFileInfos; } -const BObjectList& +const BObjectList& BPackageInfo::Users() const { return fUsers; @@ -566,35 +566,35 @@ BPackageInfo::PreUninstallScripts() const } -const BObjectList& +const BObjectList& BPackageInfo::ProvidesList() const { return fProvidesList; } -const BObjectList& +const BObjectList& BPackageInfo::RequiresList() const { return fRequiresList; } -const BObjectList& +const BObjectList& BPackageInfo::SupplementsList() const { return fSupplementsList; } -const BObjectList& +const BObjectList& BPackageInfo::ConflictsList() const { return fConflictsList; } -const BObjectList& +const BObjectList& BPackageInfo::FreshensList() const { return fFreshensList; diff --git a/src/kits/package/PackageInfoParser.cpp b/src/kits/package/PackageInfoParser.cpp index 26feb1f4eb..a7ea2e2302 100644 --- a/src/kits/package/PackageInfoParser.cpp +++ b/src/kits/package/PackageInfoParser.cpp @@ -664,14 +664,14 @@ BPackageInfo::Parser::_ParseFlags() void BPackageInfo::Parser::_ParseResolvableList( - BObjectList* value) + BObjectList* value) { struct ResolvableParser : public ListElementParser { Parser& parser; - BObjectList* value; + BObjectList* value; ResolvableParser(Parser& parser_, - BObjectList* value_) + BObjectList* value_) : parser(parser_), value(value_) @@ -692,15 +692,15 @@ BPackageInfo::Parser::_ParseResolvableList( void BPackageInfo::Parser::_ParseResolvableExprList( - BObjectList* value, BString* _basePackage) + BObjectList* value, BString* _basePackage) { struct ResolvableExpressionParser : public ListElementParser { Parser& parser; - BObjectList* value; + BObjectList* value; BString* basePackage; ResolvableExpressionParser(Parser& parser, - BObjectList* value, + BObjectList* value, BString* basePackage) : parser(parser), diff --git a/src/kits/package/PackageInfoParser.h b/src/kits/package/PackageInfoParser.h index 1ea542a955..26fa928a68 100644 --- a/src/kits/package/PackageInfoParser.h +++ b/src/kits/package/PackageInfoParser.h @@ -86,9 +86,9 @@ private: bool convertToLowerCase = false, StringValidator* stringValidator = NULL); void _ParseResolvableList( - BObjectList* value); + BObjectList* value); void _ParseResolvableExprList( - BObjectList* + BObjectList* value, BString* _basePackage = NULL); void _ParseGlobalWritableFileInfos( diff --git a/src/kits/package/PackageInfoStringBuilder.h b/src/kits/package/PackageInfoStringBuilder.h index 5fff72b7d7..c7e4a660f0 100644 --- a/src/kits/package/PackageInfoStringBuilder.h +++ b/src/kits/package/PackageInfoStringBuilder.h @@ -124,7 +124,7 @@ private: } template - void _WriteValue(const BObjectList& value) + void _WriteValue(const BObjectList& value) { // Note: The fBasePackage solution is disgusting, but any attempt of // encapsulating the stringification via templates seems to result in diff --git a/src/kits/package/hpkg/WriterImplBase.cpp b/src/kits/package/hpkg/WriterImplBase.cpp index 98be76c01c..b687ae02fe 100644 --- a/src/kits/package/hpkg/WriterImplBase.cpp +++ b/src/kits/package/hpkg/WriterImplBase.cpp @@ -433,7 +433,7 @@ WriterImplBase::RegisterPackageInfo(PackageAttributeList& attributeList, packageInfo.SourceURLList(), attributeList); // provides list - const BObjectList& providesList + const BObjectList& providesList = packageInfo.ProvidesList(); for (int i = 0; i < providesList.CountItems(); ++i) { BPackageResolvable* resolvable = providesList.ItemAt(i); @@ -476,7 +476,7 @@ WriterImplBase::RegisterPackageInfo(PackageAttributeList& attributeList, packageInfo.ReplacesList(), attributeList); // global writable file info list - const BObjectList& globalWritableFileInfos + const BObjectList& globalWritableFileInfos = packageInfo.GlobalWritableFileInfos(); for (int32 i = 0; i < globalWritableFileInfos.CountItems(); ++i) { BGlobalWritableFileInfo* info = globalWritableFileInfos.ItemAt(i); @@ -504,7 +504,7 @@ WriterImplBase::RegisterPackageInfo(PackageAttributeList& attributeList, } // user settings file info list - const BObjectList& userSettingsFileInfos + const BObjectList& userSettingsFileInfos = packageInfo.UserSettingsFileInfos(); for (int32 i = 0; i < userSettingsFileInfos.CountItems(); ++i) { BUserSettingsFileInfo* info = userSettingsFileInfos.ItemAt(i); @@ -527,7 +527,7 @@ WriterImplBase::RegisterPackageInfo(PackageAttributeList& attributeList, } // user list - const BObjectList& users = packageInfo.Users(); + const BObjectList& users = packageInfo.Users(); for (int32 i = 0; i < users.CountItems(); ++i) { const BUser* user = users.ItemAt(i); PackageAttribute* attribute = AddStringAttribute( @@ -603,7 +603,7 @@ WriterImplBase::RegisterPackageVersion(PackageAttributeList& attributeList, void WriterImplBase::RegisterPackageResolvableExpressionList( PackageAttributeList& attributeList, - const BObjectList& expressionList, uint8 id) + const BObjectList& expressionList, uint8 id) { for (int i = 0; i < expressionList.CountItems(); ++i) { BPackageResolvableExpression* resolvableExpr = expressionList.ItemAt(i); diff --git a/src/kits/package/manager/PackageManager.cpp b/src/kits/package/manager/PackageManager.cpp index 84570b0607..4cb26ea017 100644 --- a/src/kits/package/manager/PackageManager.cpp +++ b/src/kits/package/manager/PackageManager.cpp @@ -67,9 +67,9 @@ BPackageManager::BPackageManager(BPackageInstallationLocation location, fHomeRepository(new (std::nothrow) InstalledRepository("home", B_PACKAGE_INSTALLATION_LOCATION_HOME, -3)), fInstalledRepositories(10), - fOtherRepositories(10, true), + fOtherRepositories(10), fLocalRepository(new (std::nothrow) MiscLocalRepository), - fTransactions(5, true), + fTransactions(5), fInstallationInterface(installationInterface), fUserInteractionHandler(userInteractionHandler) { @@ -976,7 +976,7 @@ BPackageManager::InstalledRepository::InstalledRepository(const char* name, BPackageInstallationLocation location, int32 priority) : LocalRepository(), - fDisabledPackages(10, true), + fDisabledPackages(10), fPackagesToActivate(), fPackagesToDeactivate(), fInitialName(name), diff --git a/src/kits/package/solver/SolverProblem.cpp b/src/kits/package/solver/SolverProblem.cpp index a6a6bfbe88..0349453ce9 100644 --- a/src/kits/package/solver/SolverProblem.cpp +++ b/src/kits/package/solver/SolverProblem.cpp @@ -56,7 +56,7 @@ BSolverProblem::BSolverProblem(BType type, BSolverPackage* sourcePackage, fSourcePackage(sourcePackage), fTargetPackage(targetPackage), fDependency(), - fSolutions(10, true) + fSolutions(10) { } @@ -69,7 +69,7 @@ BSolverProblem::BSolverProblem(BType type, BSolverPackage* sourcePackage, fSourcePackage(sourcePackage), fTargetPackage(targetPackage), fDependency(dependency), - fSolutions(10, true) + fSolutions(10) { } diff --git a/src/kits/package/solver/SolverProblemSolution.cpp b/src/kits/package/solver/SolverProblemSolution.cpp index 44ff4c5f4e..1ccce90627 100644 --- a/src/kits/package/solver/SolverProblemSolution.cpp +++ b/src/kits/package/solver/SolverProblemSolution.cpp @@ -124,7 +124,7 @@ BSolverProblemSolutionElement::ToString() const BSolverProblemSolution::BSolverProblemSolution() : - fElements(10, true) + fElements(10) { } diff --git a/src/kits/package/solver/SolverRepository.cpp b/src/kits/package/solver/SolverRepository.cpp index d88d763915..c2c4823417 100644 --- a/src/kits/package/solver/SolverRepository.cpp +++ b/src/kits/package/solver/SolverRepository.cpp @@ -27,7 +27,7 @@ BSolverRepository::BSolverRepository() fName(), fPriority(0), fIsInstalled(false), - fPackages(kInitialPackageListSize, true), + fPackages(kInitialPackageListSize), fChangeCount(0) { } @@ -38,7 +38,7 @@ BSolverRepository::BSolverRepository(const BString& name) fName(), fPriority(0), fIsInstalled(false), - fPackages(kInitialPackageListSize, true), + fPackages(kInitialPackageListSize), fChangeCount(0) { SetTo(name); @@ -50,7 +50,7 @@ BSolverRepository::BSolverRepository(BPackageInstallationLocation location) fName(), fPriority(0), fIsInstalled(false), - fPackages(kInitialPackageListSize, true), + fPackages(kInitialPackageListSize), fChangeCount(0) { SetTo(location); @@ -62,7 +62,7 @@ BSolverRepository::BSolverRepository(BAllInstallationLocations) fName(), fPriority(0), fIsInstalled(false), - fPackages(kInitialPackageListSize, true), + fPackages(kInitialPackageListSize), fChangeCount(0) { SetTo(B_ALL_INSTALLATION_LOCATIONS); @@ -74,7 +74,7 @@ BSolverRepository::BSolverRepository(const BRepositoryConfig& config) fName(), fPriority(0), fIsInstalled(false), - fPackages(kInitialPackageListSize, true), + fPackages(kInitialPackageListSize), fChangeCount(0) { SetTo(config); diff --git a/src/kits/package/solver/SolverResult.cpp b/src/kits/package/solver/SolverResult.cpp index 581233969a..9f4d6e5544 100644 --- a/src/kits/package/solver/SolverResult.cpp +++ b/src/kits/package/solver/SolverResult.cpp @@ -65,7 +65,7 @@ BSolverResultElement::operator=(const BSolverResultElement& other) BSolverResult::BSolverResult() : - fElements(20, true) + fElements(20) { } diff --git a/src/kits/package/solver/libsolv/LibsolvSolver.cpp b/src/kits/package/solver/libsolv/LibsolvSolver.cpp index 78eb11bd94..05abb486bc 100644 --- a/src/kits/package/solver/libsolv/LibsolvSolver.cpp +++ b/src/kits/package/solver/libsolv/LibsolvSolver.cpp @@ -178,11 +178,11 @@ LibsolvSolver::LibsolvSolver() fPool(NULL), fSolver(NULL), fJobs(NULL), - fRepositoryInfos(10, true), + fRepositoryInfos(10), fInstalledRepository(NULL), fSolvablePackages(), fPackageSolvables(), - fProblems(10, true), + fProblems(10), fDebugLevel(0) { } diff --git a/src/kits/package/solver/libsolv/LibsolvSolver.h b/src/kits/package/solver/libsolv/LibsolvSolver.h index 8f3a3da7c0..ec354496dc 100644 --- a/src/kits/package/solver/libsolv/LibsolvSolver.h +++ b/src/kits/package/solver/libsolv/LibsolvSolver.h @@ -79,8 +79,8 @@ private: struct Problem; struct Solution; - typedef BObjectList RepositoryInfoList; - typedef BObjectList ProblemList; + typedef BObjectList RepositoryInfoList; + typedef BObjectList ProblemList; typedef std::map SolvableMap; typedef std::map PackageMap; diff --git a/src/kits/shared/BarberPole.cpp b/src/kits/shared/BarberPole.cpp index 9319757ca5..0866e7cb76 100644 --- a/src/kits/shared/BarberPole.cpp +++ b/src/kits/shared/BarberPole.cpp @@ -33,7 +33,7 @@ private: private: MachineRoom() : - fMessengers(20, true) + fMessengers(20) { fSpinLoopLock = create_sem(0, "BarberPole lock"); fSpinLoopThread = spawn_thread(&MachineRoom::_StartSpinLoop, @@ -126,7 +126,7 @@ private: sem_id fSpinLoopLock; BLocker fLock; - BObjectList fMessengers; + BObjectList fMessengers; }; diff --git a/src/kits/shared/MessageBuilder.cpp b/src/kits/shared/MessageBuilder.cpp index e81bd3429c..365e55def4 100644 --- a/src/kits/shared/MessageBuilder.cpp +++ b/src/kits/shared/MessageBuilder.cpp @@ -17,7 +17,7 @@ namespace BPrivate { BMessageBuilder::BMessageBuilder(BMessage& message) : - fNameStack(20, true), + fNameStack(20), fCurrentMessage(&message) { } diff --git a/src/kits/shared/TextTable.cpp b/src/kits/shared/TextTable.cpp index 8baab597c1..0542389a86 100644 --- a/src/kits/shared/TextTable.cpp +++ b/src/kits/shared/TextTable.cpp @@ -155,8 +155,8 @@ private: TextTable::TextTable() : - fColumns(10, true), - fRows(100, true) + fColumns(10), + fRows(100) { } diff --git a/src/kits/shared/Thread.cpp b/src/kits/shared/Thread.cpp index e0ed3e777e..d3cea23316 100644 --- a/src/kits/shared/Thread.cpp +++ b/src/kits/shared/Thread.cpp @@ -103,7 +103,7 @@ Thread::Run() void -ThreadSequence::Launch(BObjectList* list, bool async, +ThreadSequence::Launch(BObjectList* list, bool async, int32 priority) { if (!async) { @@ -114,7 +114,7 @@ ThreadSequence::Launch(BObjectList* list, bool async, } -ThreadSequence::ThreadSequence(BObjectList* list, +ThreadSequence::ThreadSequence(BObjectList* list, int32 priority) : SimpleThread(priority), fFunctorList(list) @@ -130,7 +130,7 @@ ThreadSequence::~ThreadSequence() void -ThreadSequence::Run(BObjectList* list) +ThreadSequence::Run(BObjectList* list) { int32 count = list->CountItems(); for (int32 index = 0; index < count; index++) diff --git a/src/kits/storage/MergedDirectory.cpp b/src/kits/storage/MergedDirectory.cpp index bcbd909a0b..12dc389405 100644 --- a/src/kits/storage/MergedDirectory.cpp +++ b/src/kits/storage/MergedDirectory.cpp @@ -30,7 +30,7 @@ struct BMergedDirectory::EntryNameSet : std::set { BMergedDirectory::BMergedDirectory(BPolicy policy) : BEntryList(), - fDirectories(10, true), + fDirectories(10), fPolicy(policy), fDirectoryIndex(0), fVisitedEntries(NULL) diff --git a/src/kits/storage/disk_device/DiskDeviceJobQueue.cpp b/src/kits/storage/disk_device/DiskDeviceJobQueue.cpp index e10775ce2f..3b973ec1c2 100644 --- a/src/kits/storage/disk_device/DiskDeviceJobQueue.cpp +++ b/src/kits/storage/disk_device/DiskDeviceJobQueue.cpp @@ -20,7 +20,7 @@ // constructor DiskDeviceJobQueue::DiskDeviceJobQueue() - : fJobs(20, true) + : fJobs(20) { } diff --git a/src/kits/storage/disk_device/DiskDeviceJobQueue.h b/src/kits/storage/disk_device/DiskDeviceJobQueue.h index eee931caee..aba600cae2 100644 --- a/src/kits/storage/disk_device/DiskDeviceJobQueue.h +++ b/src/kits/storage/disk_device/DiskDeviceJobQueue.h @@ -25,7 +25,7 @@ public: status_t Execute(); private: - typedef BObjectList JobList; + typedef BObjectList JobList; JobList fJobs; }; diff --git a/src/kits/storage/disk_device/DiskDeviceList.cpp b/src/kits/storage/disk_device/DiskDeviceList.cpp index 3b9c99d750..b906261462 100644 --- a/src/kits/storage/disk_device/DiskDeviceList.cpp +++ b/src/kits/storage/disk_device/DiskDeviceList.cpp @@ -24,7 +24,7 @@ using namespace std; */ BDiskDeviceList::BDiskDeviceList(bool useOwnLocker) : fLocker(NULL), - fDevices(20, true), + fDevices(20), fSubscribed(false) { if (useOwnLocker) diff --git a/src/kits/support/PointerList.cpp b/src/kits/support/PointerList.cpp index 58c87e152e..4ff98abcb9 100644 --- a/src/kits/support/PointerList.cpp +++ b/src/kits/support/PointerList.cpp @@ -243,7 +243,7 @@ private: _PointerList_::_PointerList_(int32 itemsPerBlock, bool own) : BList(itemsPerBlock), - owning(own) + fLegacyOwning(own) { } @@ -252,7 +252,7 @@ _PointerList_::_PointerList_(int32 itemsPerBlock, bool own) _PointerList_::_PointerList_(const _PointerList_ &list) : BList(list), - owning(list.owning) + fLegacyOwning(list.fLegacyOwning) { } @@ -393,5 +393,3 @@ _PointerList_::MoveItem(int32 from, int32 to) items[to] = fromItem; return true; } - - diff --git a/src/kits/tracker/AttributeStream.cpp b/src/kits/tracker/AttributeStream.cpp index acad531e72..0f4a0bc042 100644 --- a/src/kits/tracker/AttributeStream.cpp +++ b/src/kits/tracker/AttributeStream.cpp @@ -430,7 +430,7 @@ AttributeStreamFileNode::Next() AttributeStreamMemoryNode::AttributeStreamMemoryNode() : - fAttributes(5, true), + fAttributes(5), fCurrentIndex(-1) { } @@ -798,7 +798,7 @@ SelectiveAttributeTransformer::SelectiveAttributeTransformer( fAttributeNameToTransform(attributeName), fTransformFunc(transformFunc), fTransformParams(params), - fTransformedBuffers(10, false) + fTransformedBuffers(10) { } diff --git a/src/kits/tracker/AttributeStream.h b/src/kits/tracker/AttributeStream.h index 5c1bc8bffb..128bc1e3fb 100644 --- a/src/kits/tracker/AttributeStream.h +++ b/src/kits/tracker/AttributeStream.h @@ -233,7 +233,7 @@ protected: int32 Find(const char* name, uint32 type) const; private: - BObjectList fAttributes; + BObjectList fAttributes; int32 fCurrentIndex; typedef AttributeStreamNode _inherited; diff --git a/src/kits/tracker/BackgroundImage.cpp b/src/kits/tracker/BackgroundImage.cpp index 0376566e94..54af082c5c 100644 --- a/src/kits/tracker/BackgroundImage.cpp +++ b/src/kits/tracker/BackgroundImage.cpp @@ -151,7 +151,7 @@ BackgroundImage::BackgroundImage(const BNode* node, bool desktop) fDefinedByNode(*node), fView(NULL), fShowingBitmap(NULL), - fBitmapForWorkspaceList(1, true) + fBitmapForWorkspaceList(1) { } diff --git a/src/kits/tracker/BackgroundImage.h b/src/kits/tracker/BackgroundImage.h index 9e7cf372c4..7f2267871c 100644 --- a/src/kits/tracker/BackgroundImage.h +++ b/src/kits/tracker/BackgroundImage.h @@ -126,7 +126,7 @@ private: BView* fView; BackgroundImageInfo* fShowingBitmap; - BObjectList fBitmapForWorkspaceList; + BObjectList fBitmapForWorkspaceList; }; } // namespace BPrivate diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index eeb3ebbf44..25870eff57 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -120,8 +120,8 @@ struct StaggerOneParams { BRect BContainerWindow::sNewWindRect; static int32 sWindowStaggerBy; -LockingList* BContainerWindow::fAddOnsList - = new LockingList(10, true); +LockingList* BContainerWindow::fAddOnsList + = new LockingList(10); namespace BPrivate { @@ -2688,7 +2688,7 @@ BContainerWindow::EachAddOn(void (*eachAddOn)(const Model*, const char*, BContainerWindow* window, BMenu* menu), void* passThru, BStringList& mimeTypes, BMenu* menu) { - AutoLock > lock(fAddOnsList); + AutoLock > lock(fAddOnsList); if (!lock.IsLocked()) return; @@ -2998,7 +2998,7 @@ BContainerWindow::AddOnMessage(int32 what) BMessage* message = new BMessage(what); // add selected refs to message - BObjectList* selectionList = PoseView()->SelectionList(); + PoseList* selectionList = PoseView()->SelectionList(); int32 index = 0; BPose* pose; diff --git a/src/kits/tracker/ContainerWindow.h b/src/kits/tracker/ContainerWindow.h index 21ca813764..d266eb0fb6 100644 --- a/src/kits/tracker/ContainerWindow.h +++ b/src/kits/tracker/ContainerWindow.h @@ -338,7 +338,7 @@ protected: BackgroundImage* fBackgroundImage; - static LockingList* fAddOnsList; + static LockingList* fAddOnsList; private: BRect fSavedZoomRect; @@ -347,7 +347,7 @@ private: static BRect sNewWindRect; BMessage* fDragMessage; - BObjectList* fCachedTypesList; + BStringList* fCachedTypesList; bool fWaitingForRefs; bool fSaveStateIsEnabled; bool fIsWatchingPath; diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp index 979cf3c488..0b433a92ed 100644 --- a/src/kits/tracker/DeskWindow.cpp +++ b/src/kits/tracker/DeskWindow.cpp @@ -131,7 +131,7 @@ FindElement(struct AddOnShortcut* item, void* castToOther) static void LoadAddOnDir(BDirectory directory, BDeskWindow* window, - LockingList* list) + LockingList* list) { BEntry entry; while (directory.GetNextEntry(&entry) == B_OK) { @@ -291,7 +291,7 @@ BDeskWindow::Init(const BMessage*) void BDeskWindow::InitAddOnsList(bool update) { - AutoLock > lock(fAddOnsList); + AutoLock > lock(fAddOnsList); if (!lock.IsLocked()) return; @@ -315,7 +315,7 @@ BDeskWindow::InitAddOnsList(bool update) void BDeskWindow::ApplyShortcutPreferences(bool update) { - AutoLock > lock(fAddOnsList); + AutoLock > lock(fAddOnsList); if (!lock.IsLocked()) return; diff --git a/src/kits/tracker/EntryIterator.cpp b/src/kits/tracker/EntryIterator.cpp index 2ae9d6f315..e6cf106d71 100644 --- a/src/kits/tracker/EntryIterator.cpp +++ b/src/kits/tracker/EntryIterator.cpp @@ -432,7 +432,7 @@ DirectoryEntryList::CountEntries() EntryIteratorList::EntryIteratorList() : - fList(5, true), + fList(5), fCurrentIndex(0) { } diff --git a/src/kits/tracker/EntryIterator.h b/src/kits/tracker/EntryIterator.h index 501da3e7ad..caaf81886a 100644 --- a/src/kits/tracker/EntryIterator.h +++ b/src/kits/tracker/EntryIterator.h @@ -189,7 +189,7 @@ public: virtual int32 CountEntries(); protected: - BObjectList fList; + BObjectList fList; int32 fCurrentIndex; }; diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp index 9a4e8163d8..0f966c2047 100644 --- a/src/kits/tracker/FSClipboard.cpp +++ b/src/kits/tracker/FSClipboard.cpp @@ -373,9 +373,9 @@ FSClipboardPaste(Model* model, uint32 linksMode) node_ref* destNodeRef = (node_ref*)model->NodeRef(); // these will be passed to the asynchronous copy/move process - BObjectList* moveList = new BObjectList(0, true); - BObjectList* copyList = new BObjectList(0, true); - BObjectList* duplicateList = new BObjectList(0, true); + BObjectList* moveList = new BObjectList(0); + BObjectList* copyList = new BObjectList(0); + BObjectList* duplicateList = new BObjectList(0); if ((be_clipboard->Lock())) { BMessage* clip = be_clipboard->Data(); @@ -610,7 +610,7 @@ FSClipboardRemove(Model* model) BClipboardRefsWatcher::BClipboardRefsWatcher() : BLooper("ClipboardRefsWatcher", B_LOW_PRIORITY, 4096), - fNotifyList(10, false) + fNotifyList(10) { watch_node(NULL, B_WATCH_MOUNT, this); fRefsInClipboard = FSClipboardHasRefs(); diff --git a/src/kits/tracker/FSUndoRedo.cpp b/src/kits/tracker/FSUndoRedo.cpp index ad6c798cf3..f9b6561dd0 100644 --- a/src/kits/tracker/FSUndoRedo.cpp +++ b/src/kits/tracker/FSUndoRedo.cpp @@ -64,7 +64,7 @@ static BLocker sLock("undo"); class UndoItemCopy : public UndoItem { public: - UndoItemCopy(BObjectList* sourceList, BDirectory &target, + UndoItemCopy(BObjectList* sourceList, BDirectory &target, BList* pointList, uint32 moveMode); virtual ~UndoItemCopy(); @@ -73,8 +73,8 @@ class UndoItemCopy : public UndoItem { virtual void UpdateEntry(BEntry* entry, const char* name); private: - BObjectList fSourceList; - BObjectList fTargetList; + BObjectList fSourceList; + BObjectList fTargetList; entry_ref fSourceRef, fTargetRef; uint32 fMoveMode; }; @@ -85,7 +85,7 @@ class UndoItemMove : public UndoItem { /** source - list of file(s) that were moved. Assumes ownership. * origfolder - location it was moved from */ - UndoItemMove(BObjectList* sourceList, BDirectory &target, + UndoItemMove(BObjectList* sourceList, BDirectory &target, BList* pointList); virtual ~UndoItemMove(); @@ -93,7 +93,7 @@ class UndoItemMove : public UndoItem { virtual status_t Redo(); private: - BObjectList fSourceList; + BObjectList fSourceList; entry_ref fSourceRef, fTargetRef; }; @@ -150,7 +150,7 @@ class UndoItemRenameVolume : public UndoItem { static status_t -ChangeListSource(BObjectList &list, BEntry &entry) +ChangeListSource(BObjectList &list, BEntry &entry) { node_ref source; if (entry.GetNodeRef(&source) != B_OK) @@ -207,7 +207,7 @@ Undo::Remove() } -MoveCopyUndo::MoveCopyUndo(BObjectList* sourceList, +MoveCopyUndo::MoveCopyUndo(BObjectList* sourceList, BDirectory &dest, BList* pointList, uint32 moveMode) { if (moveMode == kMoveSelectionTo) @@ -238,7 +238,7 @@ RenameVolumeUndo::RenameVolumeUndo(BVolume &volume, const char* newName) // #pragma mark - UndoItemCopy -UndoItemCopy::UndoItemCopy(BObjectList* sourceList, +UndoItemCopy::UndoItemCopy(BObjectList* sourceList, BDirectory &target, BList* /*pointList*/, uint32 moveMode) : fSourceList(*sourceList), @@ -266,7 +266,7 @@ UndoItemCopy::~UndoItemCopy() status_t UndoItemCopy::Undo() { - FSDeleteRefList(new BObjectList(fTargetList), true, false); + FSDeleteRefList(new BObjectList(fTargetList), true, false); return B_OK; } @@ -274,7 +274,7 @@ UndoItemCopy::Undo() status_t UndoItemCopy::Redo() { - FSMoveToFolder(new BObjectList(fSourceList), + FSMoveToFolder(new BObjectList(fSourceList), new BEntry(&fTargetRef), FSUndoMoveMode(fMoveMode), NULL); return B_OK; @@ -302,7 +302,7 @@ UndoItemCopy::UpdateEntry(BEntry* entry, const char* name) // #pragma mark - UndoItemMove -UndoItemMove::UndoItemMove(BObjectList* sourceList, +UndoItemMove::UndoItemMove(BObjectList* sourceList, BDirectory &target, BList* /*pointList*/) : fSourceList(*sourceList) @@ -326,7 +326,7 @@ UndoItemMove::~UndoItemMove() status_t UndoItemMove::Undo() { - BObjectList* list = new BObjectList(fSourceList); + BObjectList* list = new BObjectList(fSourceList); BEntry entry(&fTargetRef); ChangeListSource(*list, entry); @@ -342,7 +342,7 @@ status_t UndoItemMove::Redo() { // FSMoveToFolder() owns its arguments - FSMoveToFolder(new BObjectList(fSourceList), + FSMoveToFolder(new BObjectList(fSourceList), new BEntry(&fTargetRef), FSUndoMoveMode(kMoveSelectionTo), NULL); return B_OK; diff --git a/src/kits/tracker/FSUndoRedo.h b/src/kits/tracker/FSUndoRedo.h index 07e259bed5..6a3badf8b7 100644 --- a/src/kits/tracker/FSUndoRedo.h +++ b/src/kits/tracker/FSUndoRedo.h @@ -59,7 +59,7 @@ class Undo { class MoveCopyUndo : public Undo { public: - MoveCopyUndo(BObjectList* sourceList, BDirectory &dest, + MoveCopyUndo(BObjectList* sourceList, BDirectory &dest, BList* pointList, uint32 moveMode); }; diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index b4c986aed8..400ea6a7aa 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -120,17 +120,17 @@ static status_t FSDeleteFolder(BEntry*, CopyLoopControl*, bool updateStatus, static status_t MoveEntryToTrash(BEntry*, BPoint*, Undo &undo); static void LowLevelCopy(BEntry*, StatStruct*, BDirectory*, char* destName, CopyLoopControl*, BPoint*); -status_t DuplicateTask(BObjectList* srcList); -static status_t MoveTask(BObjectList*, BEntry*, BList*, uint32); -static status_t _DeleteTask(BObjectList*, bool); -static status_t _RestoreTask(BObjectList*); +status_t DuplicateTask(BObjectList* srcList); +static status_t MoveTask(BObjectList*, BEntry*, BList*, uint32); +static status_t _DeleteTask(BObjectList*, bool); +static status_t _RestoreTask(BObjectList*); status_t CalcItemsAndSize(CopyLoopControl* loopControl, - BObjectList* refList, ssize_t blockSize, int32* totalCount, + BObjectList* refList, ssize_t blockSize, int32* totalCount, off_t* totalSize); status_t MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode, const char* newName, Undo &undo, CopyLoopControl* loopControl); -ConflictCheckResult PreFlightNameCheck(BObjectList* srcList, +ConflictCheckResult PreFlightNameCheck(BObjectList* srcList, const BDirectory* destDir, int32* collisionCount, uint32 moveMode); status_t CheckName(uint32 moveMode, const BEntry* srcEntry, const BDirectory* destDir, bool multipleCollisions, @@ -542,7 +542,7 @@ SetupPoseLocation(ino_t sourceParentIno, ino_t destParentIno, const BNode* sourc void -FSMoveToFolder(BObjectList* srcList, BEntry* destEntry, +FSMoveToFolder(BObjectList* srcList, BEntry* destEntry, uint32 moveMode, BList* pointList) { if (srcList->IsEmpty()) { @@ -560,14 +560,14 @@ FSMoveToFolder(BObjectList* srcList, BEntry* destEntry, void FSDelete(entry_ref* ref, bool async, bool confirm) { - BObjectList* list = new BObjectList(1, true); + BObjectList* list = new BObjectList(1); list->AddItem(ref); FSDeleteRefList(list, async, confirm); } void -FSDeleteRefList(BObjectList* list, bool async, bool confirm) +FSDeleteRefList(BObjectList* list, bool async, bool confirm) { if (async) { LaunchInNewThread("DeleteTask", B_NORMAL_PRIORITY, _DeleteTask, list, @@ -578,7 +578,7 @@ FSDeleteRefList(BObjectList* list, bool async, bool confirm) void -FSRestoreRefList(BObjectList* list, bool async) +FSRestoreRefList(BObjectList* list, bool async) { if (async) { LaunchInNewThread("RestoreTask", B_NORMAL_PRIORITY, _RestoreTask, @@ -589,7 +589,7 @@ FSRestoreRefList(BObjectList* list, bool async) void -FSMoveToTrash(BObjectList* srcList, BList* pointList, bool async) +FSMoveToTrash(BObjectList* srcList, BList* pointList, bool async) { if (srcList->IsEmpty()) { delete srcList; @@ -876,7 +876,7 @@ ShouldEditRefName(const entry_ref* ref, const char* name, size_t length) static status_t InitCopy(CopyLoopControl* loopControl, uint32 moveMode, - BObjectList* srcList, BVolume* dstVol, BDirectory* destDir, + BObjectList* srcList, BVolume* dstVol, BDirectory* destDir, entry_ref* destRef, bool preflightNameCheck, bool needSizeCalculation, int32* collisionCount, ConflictCheckResult* preflightResult) { @@ -997,7 +997,7 @@ delete_point(void* point) static status_t -MoveTask(BObjectList* srcList, BEntry* destEntry, BList* pointList, uint32 moveMode) +MoveTask(BObjectList* srcList, BEntry* destEntry, BList* pointList, uint32 moveMode) { ASSERT(!srcList->IsEmpty()); @@ -1918,7 +1918,7 @@ MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode, void -FSDuplicate(BObjectList* srcList, BList* pointList) +FSDuplicate(BObjectList* srcList, BList* pointList) { LaunchInNewThread("DupTask", B_NORMAL_PRIORITY, MoveTask, srcList, (BEntry*)NULL, pointList, kDuplicateSelection); @@ -2132,7 +2132,7 @@ MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo) ConflictCheckResult -PreFlightNameCheck(BObjectList* srcList, const BDirectory* destDir, +PreFlightNameCheck(BObjectList* srcList, const BDirectory* destDir, int32* collisionCount, uint32 moveMode) { // count the number of name collisions in dest folder @@ -2588,7 +2588,7 @@ FSRecursiveCalcSize(BInfoWindow* window, CopyLoopControl* loopControl, status_t CalcItemsAndSize(CopyLoopControl* loopControl, - BObjectList* refList, ssize_t blockSize, int32* totalCount, + BObjectList* refList, ssize_t blockSize, int32* totalCount, off_t* totalSize) { int32 fileCount = 0; @@ -2995,7 +2995,7 @@ empty_trash(void*) TrackerCopyLoopControl loopControl(kTrashState); // calculate the sum total of all items on all volumes in trash - BObjectList srcList; + BObjectList srcList; int32 totalCount = 0; off_t totalSize = 0; @@ -3056,7 +3056,7 @@ empty_trash(void*) status_t -_DeleteTask(BObjectList* list, bool confirm) +_DeleteTask(BObjectList* list, bool confirm) { if (confirm) { BAlert* alert = new BAlert("", @@ -3149,7 +3149,7 @@ FSRecursiveCreateFolder(BPath path) } status_t -_RestoreTask(BObjectList* list) +_RestoreTask(BObjectList* list) { TrackerCopyLoopControl loopControl(kRestoreFromTrashState); diff --git a/src/kits/tracker/FSUtils.h b/src/kits/tracker/FSUtils.h index 413f479460..e2f9be5596 100644 --- a/src/kits/tracker/FSUtils.h +++ b/src/kits/tracker/FSUtils.h @@ -147,7 +147,7 @@ public: // status window, such that the user can drop additional items onto the // progress display of the ongoing copy process to copy these items to // the same target directory. - typedef BObjectList EntryList; + typedef BObjectList EntryList; void SetSourceList(EntryList* list); @@ -167,9 +167,9 @@ private: #endif _IMPEXP_TRACKER status_t FSCopyAttributesAndStats(BNode*, BNode*, bool = true); -_IMPEXP_TRACKER void FSDuplicate(BObjectList* srcList, +_IMPEXP_TRACKER void FSDuplicate(BObjectList* srcList, BList* pointList); -_IMPEXP_TRACKER void FSMoveToFolder(BObjectList* srcList, BEntry*, +_IMPEXP_TRACKER void FSMoveToFolder(BObjectList* srcList, BEntry*, uint32 moveMode, BList* pointList = NULL); _IMPEXP_TRACKER void FSMakeOriginalName(char* name, BDirectory* destDir, const char* suffix); @@ -178,13 +178,13 @@ _IMPEXP_TRACKER bool FSIsPrintersDir(const BEntry*); _IMPEXP_TRACKER bool FSIsDeskDir(const BEntry*); _IMPEXP_TRACKER bool FSIsHomeDir(const BEntry*); _IMPEXP_TRACKER bool FSIsRootDir(const BEntry*); -_IMPEXP_TRACKER void FSMoveToTrash(BObjectList* srcList, +_IMPEXP_TRACKER void FSMoveToTrash(BObjectList* srcList, BList* pointList = NULL, bool async = true); // Deprecated -void FSDeleteRefList(BObjectList*, bool, bool confirm = true); +void FSDeleteRefList(BObjectList*, bool, bool confirm = true); void FSDelete(entry_ref*, bool, bool confirm = true); -void FSRestoreRefList(BObjectList* list, bool async); +void FSRestoreRefList(BObjectList* list, bool async); _IMPEXP_TRACKER status_t FSLaunchItem(const entry_ref* application, const BMessage* refsReceived, bool async, bool openWithOK); diff --git a/src/kits/tracker/FilePanelPriv.cpp b/src/kits/tracker/FilePanelPriv.cpp index 9bfa4793f9..34f5fe664e 100644 --- a/src/kits/tracker/FilePanelPriv.cpp +++ b/src/kits/tracker/FilePanelPriv.cpp @@ -598,7 +598,7 @@ TFilePanel::AdjustButton() BTextControl* textControl = dynamic_cast(FindView("text view")); - BObjectList* selectionList = fPoseView->SelectionList(); + PoseList* selectionList = fPoseView->SelectionList(); BString buttonText = fButtonText; bool enabled = false; @@ -1415,7 +1415,7 @@ TFilePanel::MessageReceived(BMessage* message) void TFilePanel::OpenDirectory() { - BObjectList* list = PoseView()->SelectionList(); + PoseList* list = PoseView()->SelectionList(); if (list->CountItems() != 1) return; @@ -1635,7 +1635,7 @@ void TFilePanel::HandleOpenButton() { PoseView()->CommitActivePose(); - BObjectList* selection = PoseView()->SelectionList(); + PoseList* selection = PoseView()->SelectionList(); // if we have only one directory and we're not opening dirs, enter. if ((fNodeFlavors & B_DIRECTORY_NODE) == 0 diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 7dcf1b722f..9f040e6f87 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -377,7 +377,7 @@ FindWindow::DeleteQueryOrTemplate(BEntry* entry) static bool -CheckForDuplicates(BObjectList* list, entry_ref* ref) +CheckForDuplicates(BObjectList* list, entry_ref* ref) { // Simple Helper Function To Check For Duplicates Within an Entry List of Templates int32 count = list->CountItems(); @@ -395,7 +395,7 @@ FindWindow::PopulateTemplatesMenu() { fTemplatesMenu->RemoveItems(0, fTemplatesMenu->CountItems(), true); - BObjectList templates(10, true); + BObjectList templates(10); BVolumeRoster roster; BVolume volume; while (roster.GetNextVolume(&volume) == B_OK) { @@ -2549,9 +2549,9 @@ AddOneRecentItem(const entry_ref* ref, void* castToParams) return NULL; } -// Helper Function To Catch Entries caused from duplicate files received through BQuery -bool -CheckForDuplicates(BObjectList* list, EntryWithDate* entry) + +static bool +CheckForDuplicates(BObjectList* list, EntryWithDate* entry) { // params checking if (list == NULL || entry == NULL) @@ -2574,8 +2574,8 @@ void FindPanel::AddRecentQueries(BMenu* menu, bool addSaveAsItem, const BMessenger* target, uint32 what, bool includeTemplates) { - BObjectList templates(10, true); - BObjectList recentQueries(10, true); + BObjectList templates(10); + BObjectList recentQueries(10); // find all the queries on all volumes BVolumeRoster roster; diff --git a/src/kits/tracker/IconCache.cpp b/src/kits/tracker/IconCache.cpp index b1d047ad14..b934cd1d60 100644 --- a/src/kits/tracker/IconCache.cpp +++ b/src/kits/tracker/IconCache.cpp @@ -1390,7 +1390,7 @@ IconCache::IconHitTest(BPoint where, const Model* model, IconDrawMode mode, void -IconCacheEntry::RetireIcons(BObjectList* retiredBitmapList) +IconCacheEntry::RetireIcons(BObjectList* retiredBitmapList) { if (fLargeIcon != NULL) { retiredBitmapList->AddItem(fLargeIcon); @@ -1425,7 +1425,7 @@ SharedIconCache::SharedIconCache() : SimpleIconCache("Tracker shared icon cache"), fHashTable(), - fRetiredBitmaps(256, true) + fRetiredBitmaps(256) { fHashTable.Init(256); } diff --git a/src/kits/tracker/IconCache.h b/src/kits/tracker/IconCache.h index ce0b1b4dc2..e088ae3675 100644 --- a/src/kits/tracker/IconCache.h +++ b/src/kits/tracker/IconCache.h @@ -177,7 +177,7 @@ public: bool IconHitTest(BPoint, IconDrawMode, BSize) const; // given a point, returns true if a non-transparent pixel was hit - void RetireIcons(BObjectList* retiredBitmapList); + void RetireIcons(BObjectList* retiredBitmapList); // can't just delete icons, they may be still drawing // async; instead, put them on the retired list and // only delete the list if it grows too much, way after @@ -289,7 +289,7 @@ private: typedef BOpenHashTable > EntryHashTable; EntryHashTable fHashTable; - BObjectList fRetiredBitmaps; + BObjectList fRetiredBitmaps; // icons are drawn asynchronously, can't just delete them right away, // instead have to place them onto the retired bitmap list and wait // for the next sync to delete them diff --git a/src/kits/tracker/LockingList.h b/src/kits/tracker/LockingList.h index bcff2f9eaf..ce041c6890 100644 --- a/src/kits/tracker/LockingList.h +++ b/src/kits/tracker/LockingList.h @@ -41,10 +41,10 @@ All rights reserved. namespace BPrivate { -template -class LockingList : public BObjectList { +template +class LockingList : public BObjectList { public: - LockingList(int32 itemsPerBlock = 20, bool owning = false); + LockingList(int32 itemsPerBlock = 20); ~LockingList() { Lock(); @@ -59,33 +59,33 @@ private: }; -template -LockingList::LockingList(int32 itemsPerBlock, bool owning) +template +LockingList::LockingList(int32 itemsPerBlock) : - BObjectList(itemsPerBlock, owning) + BObjectList(itemsPerBlock) { } -template +template bool -LockingList::Lock() +LockingList::Lock() { return lock.Lock(); } -template +template void -LockingList::Unlock() +LockingList::Unlock() { lock.Unlock(); } -template +template bool -LockingList::IsLocked() const +LockingList::IsLocked() const { return lock.IsLocked(); } diff --git a/src/kits/tracker/MimeTypeList.cpp b/src/kits/tracker/MimeTypeList.cpp index 77c9ce69d4..f82ced7285 100644 --- a/src/kits/tracker/MimeTypeList.cpp +++ b/src/kits/tracker/MimeTypeList.cpp @@ -105,8 +105,8 @@ ShortMimeInfo::IsCommonMimeType() const MimeTypeList::MimeTypeList() : - fMimeList(100, true), - fCommonMimeList(30, false), + fMimeList(100), + fCommonMimeList(30), fLock("mimeListLock") { fLock.Lock(); diff --git a/src/kits/tracker/MimeTypeList.h b/src/kits/tracker/MimeTypeList.h index eec28579d1..27aa0e6f6f 100644 --- a/src/kits/tracker/MimeTypeList.h +++ b/src/kits/tracker/MimeTypeList.h @@ -82,7 +82,7 @@ protected: void Build(); private: - BObjectList fMimeList; + BObjectList fMimeList; BObjectList fCommonMimeList; mutable Benaphore fLock; }; diff --git a/src/kits/tracker/Model.cpp b/src/kits/tracker/Model.cpp index c8e525e588..cacdcd16c9 100644 --- a/src/kits/tracker/Model.cpp +++ b/src/kits/tracker/Model.cpp @@ -59,6 +59,7 @@ All rights reserved. #include #include #include +#include #include #include #include @@ -1077,7 +1078,7 @@ enum { static int32 -MatchMimeTypeString(/*const */BString* documentType, const char* handlerType) +MatchMimeTypeString(const BString& documentType, const char* handlerType) { // perform a mime type wildcard match // handler types of the form "text" @@ -1094,16 +1095,16 @@ MatchMimeTypeString(/*const */BString* documentType, const char* handlerType) if (supertypeOnlyLength) { // compare just the supertype - tmp = strstr(documentType->String(), "/"); - if (tmp && (tmp - documentType->String() == supertypeOnlyLength)) { - if (documentType->ICompare(handlerType, supertypeOnlyLength) == 0) + tmp = strstr(documentType.String(), "/"); + if (tmp && (tmp - documentType.String() == supertypeOnlyLength)) { + if (documentType.ICompare(handlerType, supertypeOnlyLength) == 0) return kMatchSupertype; else return kDontMatch; } } - if (documentType->ICompare(handlerType) == 0) + if (documentType.ICompare(handlerType) == 0) return kMatch; return kDontMatch; @@ -1111,7 +1112,7 @@ MatchMimeTypeString(/*const */BString* documentType, const char* handlerType) int32 -Model::SupportsMimeType(const char* type, const BObjectList* list, +Model::SupportsMimeType(const char* type, const BStringList* list, bool exactReason) const { ASSERT((type == 0) != (list == 0)); @@ -1145,21 +1146,24 @@ Model::SupportsMimeType(const char* type, const BObjectList* list, result = kSuperhandlerModel; } - int32 match; + int32 match = kDontMatch; if (type != NULL || (list != NULL && list->IsEmpty())) { BString typeString(type); - match = MatchMimeTypeString(&typeString, mimeSignature); + match = MatchMimeTypeString(typeString, mimeSignature); } else { - match = WhileEachListItem(const_cast*>(list), - MatchMimeTypeString, mimeSignature); - // const_cast shouldnt be here, have to have it until - // MW cleans up + const int32 count = list->CountStrings(); + for (int32 i = 0; i < count; i++) { + match = MatchMimeTypeString(list->StringAt(i), mimeSignature); + if (match != kDontMatch) + break; + } } - if (match == kMatch) + + if (match == kMatch) { // supports the actual type, it can't get any better return kModelSupportsType; - else if (match == kMatchSupertype) { + } else if (match == kMatchSupertype) { if (!exactReason) return kModelSupportsSupertype; @@ -1174,7 +1178,7 @@ Model::SupportsMimeType(const char* type, const BObjectList* list, bool -Model::IsDropTargetForList(const BObjectList* list) const +Model::IsDropTargetForList(const BStringList* list) const { switch (CanHandleDrops()) { case kCanHandle: diff --git a/src/kits/tracker/Model.h b/src/kits/tracker/Model.h index 458893168f..333f75f70c 100644 --- a/src/kits/tracker/Model.h +++ b/src/kits/tracker/Model.h @@ -181,7 +181,7 @@ public: // resolve if document can be opened // if zero, all executables, directories and volumes pass // if traverse, dereference symlinks - bool IsDropTargetForList(const BObjectList* list) const; + bool IsDropTargetForList(const BStringList* list) const; // contains mime types of all documents about to be handled // by model @@ -192,7 +192,7 @@ public: bool IsSuperHandler() const; int32 SupportsMimeType(const char* type, - const BObjectList* list, bool exactReason = false) const; + const BStringList* list, bool exactReason = false) const; // pass in one string in or a bunch in // if false, returns as soon as it figures out that // app supports a given type, if true, returns an exact reason diff --git a/src/kits/tracker/Navigator.cpp b/src/kits/tracker/Navigator.cpp index be97e5574f..fe9f0ee466 100644 --- a/src/kits/tracker/Navigator.cpp +++ b/src/kits/tracker/Navigator.cpp @@ -58,8 +58,8 @@ static const int32 kMaxHistory = 32; BNavigator::BNavigator(const Model* model) : BToolBar(), - fBackHistory(8, true), - fForwHistory(8, true) + fBackHistory(8), + fForwHistory(8) { // Get initial path model->GetPath(&fPath); diff --git a/src/kits/tracker/Navigator.h b/src/kits/tracker/Navigator.h index cf24129afe..b5b1b0dc60 100644 --- a/src/kits/tracker/Navigator.h +++ b/src/kits/tracker/Navigator.h @@ -90,8 +90,8 @@ private: BPath fPath; BTextControl* fLocation; - BObjectList fBackHistory; - BObjectList fForwHistory; + BObjectList fBackHistory; + BObjectList fForwHistory; typedef BView _inherited; }; diff --git a/src/kits/tracker/NodePreloader.cpp b/src/kits/tracker/NodePreloader.cpp index 5d300f80dd..fbff400c9d 100644 --- a/src/kits/tracker/NodePreloader.cpp +++ b/src/kits/tracker/NodePreloader.cpp @@ -73,7 +73,7 @@ NodePreloader::InstallNodePreloader(const char* name, BLooper* host) NodePreloader::NodePreloader(const char* name) : BHandler(name), - fModelList(20, true), + fModelList(20), fQuitRequested(false) { } diff --git a/src/kits/tracker/NodePreloader.h b/src/kits/tracker/NodePreloader.h index 6b1abfaaae..cf4ca6a567 100644 --- a/src/kits/tracker/NodePreloader.h +++ b/src/kits/tracker/NodePreloader.h @@ -71,7 +71,7 @@ private: // for now just preload apps and prefs Model* FindModel(node_ref) const; - BObjectList fModelList; + BObjectList fModelList; Benaphore fLock; volatile bool fQuitRequested; diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index fc93c24269..43fd009a80 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -1173,7 +1173,7 @@ OpenWithMenu::StartBuildingItemList() return false; } - fSupportingAppList = new BObjectList(20, true); + fSupportingAppList = new BObjectList(20); //queryRetrieval = new BStopWatch("get next entry on BQuery"); return true; diff --git a/src/kits/tracker/OpenWithWindow.h b/src/kits/tracker/OpenWithWindow.h index 9c64c8cfd1..f3c26756da 100644 --- a/src/kits/tracker/OpenWithWindow.h +++ b/src/kits/tracker/OpenWithWindow.h @@ -325,7 +325,7 @@ private: // menu building state SearchForSignatureEntryList* fIterator; entry_ref fPreferredRef; - BObjectList* fSupportingAppList; + BObjectList* fSupportingAppList; bool fHaveCommonPreferredApp; BWindow* fParentWindow; diff --git a/src/kits/tracker/PendingNodeMonitorCache.cpp b/src/kits/tracker/PendingNodeMonitorCache.cpp index 68fbfaaed8..328242e65a 100644 --- a/src/kits/tracker/PendingNodeMonitorCache.cpp +++ b/src/kits/tracker/PendingNodeMonitorCache.cpp @@ -75,7 +75,7 @@ PendingNodeMonitorEntry::TooOld(bigtime_t now) const PendingNodeMonitorCache::PendingNodeMonitorCache() : - fList(10, true) + fList(10) { } diff --git a/src/kits/tracker/PendingNodeMonitorCache.h b/src/kits/tracker/PendingNodeMonitorCache.h index 35d546e457..39516a73e2 100644 --- a/src/kits/tracker/PendingNodeMonitorCache.h +++ b/src/kits/tracker/PendingNodeMonitorCache.h @@ -78,7 +78,7 @@ public: void PoseCreatedOrMoved(BPoseView*, const BPose*); private: - BObjectList fList; + BObjectList fList; }; } // namespace BPrivate diff --git a/src/kits/tracker/Pose.cpp b/src/kits/tracker/Pose.cpp index 0beb99ec92..beb3e8b75a 100644 --- a/src/kits/tracker/Pose.cpp +++ b/src/kits/tracker/Pose.cpp @@ -74,7 +74,7 @@ BPose::BPose(Model* model, BPoseView* view, uint32 clipboardMode, bool selected) : fModel(model), - fWidgetList(4, false), + fWidgetList(4), fClipboardMode(clipboardMode), fPercent(-1), fSelectionTime(0), diff --git a/src/kits/tracker/PoseList.cpp b/src/kits/tracker/PoseList.cpp index edaba3d696..7038629acb 100644 --- a/src/kits/tracker/PoseList.cpp +++ b/src/kits/tracker/PoseList.cpp @@ -118,7 +118,7 @@ PoseList* PoseList::FindAllPoses(const node_ref* node) const { int32 count = CountItems(); - PoseList *result = new PoseList(5, false); + PoseList *result = new PoseList(5); for (int32 index = 0; index < count; index++) { BPose *pose = ItemAt(index); Model *model = pose->TargetModel(); diff --git a/src/kits/tracker/PoseList.h b/src/kits/tracker/PoseList.h index 7ac217e20b..ec77bb4ff5 100644 --- a/src/kits/tracker/PoseList.h +++ b/src/kits/tracker/PoseList.h @@ -39,6 +39,7 @@ All rights reserved. #include +#include #include "Pose.h" @@ -51,20 +52,65 @@ namespace BPrivate { class Model; -class PoseList : public BObjectList { +class PoseList : private BObjectList { + typedef BObjectList _inherited; + public: PoseList(int32 itemsPerBlock = 20, bool owning = false) : - BObjectList(itemsPerBlock, owning) + _inherited(itemsPerBlock), + fOwning(owning) { } - PoseList(const PoseList &list) + PoseList(const PoseList& list) : - BObjectList(list) + _inherited(list), + fOwning(list.fOwning) { } + ~PoseList() + { + MakeEmpty(); + } + + ::BList* AsBList() { return _inherited::Private(this).AsBList(); } + const BObjectList& AsObjectList() const { return *this; } + +public: + bool IsEmpty() const { return _inherited::IsEmpty(); } + int32 CountItems() const { return _inherited::CountItems(); } + int32 IndexOf(const BPose* p) const { return _inherited::IndexOf(p); } + bool HasItem(const BPose* p) const { return _inherited::HasItem(p); } + + BPose* FirstItem() const { return _inherited::FirstItem(); } + BPose* LastItem() const { return _inherited::LastItem(); } + BPose* ItemAt(int32 i) const { return _inherited::ItemAt(i); } + + bool AddItem(BPose* p) { return _inherited::AddItem(p); } + bool AddItem(BPose* p, int32 i) { return _inherited::AddItem(p, i); } + bool AddList(PoseList* list) { return _inherited::AddList(list); } + + bool RemoveItem(BPose* p, bool deleteIfOwning = true); + BPose* RemoveItemAt(int32 i) { return _inherited::RemoveItemAt(i); } + + void MakeEmpty(bool deleteIfOwning = true); + +public: + template + void EachListItem(void (*func)(Item*, Param1), Param1 p1) + { + ::EachListItem(this, func, p1); + } + + template + void EachListItem(void (*func)(Item*, Param1, Param2, Param3), Param1 p1, Param2 p2, Param3 p3) + { + ::EachListItem(this, func, p1, p2, p3); + } + +public: BPose* FindPose(const node_ref* node, int32* index = NULL) const; BPose* FindPose(const entry_ref* entry, int32* index = NULL) const; BPose* FindPose(const Model* model, int32* index = NULL) const; @@ -74,9 +120,34 @@ public: PoseList* FindAllPoses(const node_ref* node) const; BPose* FindPoseByFileName(const char* name, int32* _index = NULL) const; + +private: + bool fOwning; }; +inline bool +PoseList::RemoveItem(BPose* p, bool deleteIfOwning) +{ + bool removed = _inherited::RemoveItem(p); + if (removed && deleteIfOwning) + delete p; + return removed; +} + + +inline void +PoseList::MakeEmpty(bool deleteIfOwning) +{ + if (fOwning && deleteIfOwning) { + int32 count = CountItems(); + for (int32 index = 0; index < count; index++) + delete ItemAt(index); + } + _inherited::MakeEmpty(); +} + + // iteration glue, add permutations as needed diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 988930cf56..18316ff2c7 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -73,7 +73,6 @@ All rights reserved. #include #include -#include #include #include "Attributes.h" @@ -201,7 +200,7 @@ OneMatches(BPose* pose, BPoseView*, void* castToPose) static void CopySelectionListToEntryRefList(const PoseList* original, - BObjectList* copy) + BObjectList* copy) { int32 count = original->CountItems(); for (int32 index = 0; index < count; index++) { @@ -235,10 +234,9 @@ BPoseView::BPoseView(Model* model, uint32 viewMode) fVSPoseList(new PoseList()), fSelectionList(new PoseList()), fMimeTypesInSelectionCache(20), - fZombieList(new BObjectList(10, true)), - fColumnList(new BObjectList(4, true)), - fMimeTypeList(new BObjectList(10, true)), - fBrokenLinks(new BObjectList(10, false)), + fZombieList(new BObjectList(10)), + fColumnList(new BObjectList(4)), + fBrokenLinks(new BObjectList(10)), fMimeTypeListIsDirty(false), fCountView(NULL), fListElemHeight(0.0f), @@ -4658,8 +4656,8 @@ BPoseView::HandleDropCommon(BMessage* message, Model* targetModel, } // handle refs by performing a copy - BObjectList* entryList - = new BObjectList(10, true); + BObjectList* entryList + = new BObjectList(10); for (int32 index = 0; ; index++) { // copy all enclosed refs into a list @@ -5083,8 +5081,8 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow, loc, selectionList, srcWindow->PoseView()->ViewMode() == kListMode, dropOnGrid); int32 selectionSize = selectionList->CountItems(); - BObjectList* srcList - = new BObjectList(selectionSize, true); + BObjectList* srcList + = new BObjectList(selectionSize); if (srcWindow->TargetModel()->IsVirtualDirectory()) { // resolve symlink and add the resulting entry_ref to the list @@ -6013,8 +6011,8 @@ BPoseView::DuplicateSelection(BPoint* dropStart, BPoint* dropEnd) // create entry_ref list from selection if (!fSelectionList->IsEmpty()) { - BObjectList* srcList - = new BObjectList(CountSelected(), true); + BObjectList* srcList + = new BObjectList(CountSelected()); CopySelectionListToEntryRefList(fSelectionList, srcList); BList* dropPoints; @@ -6041,14 +6039,14 @@ BPoseView::SelectPoseAtLocation(BPoint point) void -BPoseView::MoveListToTrash(BObjectList* list, bool selectNext, +BPoseView::MoveListToTrash(BObjectList* list, bool selectNext, bool deleteDirectly) { if (!list->CountItems()) return; - BObjectList* taskList = - new BObjectList(2, true); + BObjectList* taskList = + new BObjectList(2); // new owning list of tasks // first move selection to trash, @@ -6087,8 +6085,8 @@ BPoseView::MoveListToTrash(BObjectList* list, bool selectNext, inline void -CopyOneTrashedRefAsEntry(const entry_ref* ref, BObjectList* trashList, - BObjectList* noTrashList, std::map* deviceHasTrash) +CopyOneTrashedRefAsEntry(const entry_ref* ref, BObjectList* trashList, + BObjectList* noTrashList, std::map* deviceHasTrash) { std::map &deviceHasTrashTmp = *deviceHasTrash; // work around stupid binding problems with EachListItem @@ -6116,8 +6114,8 @@ CopyOneTrashedRefAsEntry(const entry_ref* ref, BObjectList* trashList static void -CopyPoseOneAsEntry(BPose* pose, BObjectList* trashList, - BObjectList* noTrashList, std::map* deviceHasTrash) +CopyPoseOneAsEntry(BPose* pose, BObjectList* trashList, + BObjectList* noTrashList, std::map* deviceHasTrash) { CopyOneTrashedRefAsEntry(pose->TargetModel()->EntryRef(), trashList, noTrashList, deviceHasTrash); @@ -6145,10 +6143,10 @@ CheckVolumeReadOnly(const entry_ref* ref) void BPoseView::MoveSelectionOrEntryToTrash(const entry_ref* ref, bool selectNext) { - BObjectList* entriesToTrash = new - BObjectList(CountSelected()); - BObjectList* entriesToDeleteOnTheSpot = new - BObjectList(20, true); + BObjectList* entriesToTrash = new + BObjectList(CountSelected()); + BObjectList* entriesToDeleteOnTheSpot = new + BObjectList(20); std::map deviceHasTrash; if (ref != NULL) { @@ -6166,7 +6164,7 @@ BPoseView::MoveSelectionOrEntryToTrash(const entry_ref* ref, bool selectNext) delete entriesToDeleteOnTheSpot; return; } - EachListItem(fSelectionList, CopyPoseOneAsEntry, entriesToTrash, + fSelectionList->EachListItem(CopyPoseOneAsEntry, entriesToTrash, entriesToDeleteOnTheSpot, &deviceHasTrash); } @@ -6224,7 +6222,7 @@ BPoseView::DeleteSelection(bool selectNext, bool confirm) if (!CheckVolumeReadOnly(fSelectionList->ItemAt(0)->TargetModel()->EntryRef())) return; - BObjectList* entriesToDelete = new BObjectList(selectCount, true); + BObjectList* entriesToDelete = new BObjectList(selectCount); for (int32 index = 0; index < selectCount; index++) { entry_ref* ref = new entry_ref(*fSelectionList->ItemAt(index)->TargetModel()->EntryRef()); @@ -6242,8 +6240,8 @@ BPoseView::RestoreSelectionFromTrash(bool selectNext) if (selectCount <= 0) return; - BObjectList* entriesToRestore - = new BObjectList(selectCount, true); + BObjectList* entriesToRestore + = new BObjectList(selectCount); for (int32 index = 0; index < selectCount; index++) { entriesToRestore->AddItem(new entry_ref( @@ -6257,7 +6255,7 @@ BPoseView::RestoreSelectionFromTrash(bool selectNext) void BPoseView::Delete(const entry_ref &ref, bool selectNext, bool confirm) { - BObjectList* entriesToDelete = new BObjectList(1, true); + BObjectList* entriesToDelete = new BObjectList(1); entriesToDelete->AddItem(new entry_ref(ref)); Delete(entriesToDelete, selectNext, confirm); @@ -6265,14 +6263,14 @@ BPoseView::Delete(const entry_ref &ref, bool selectNext, bool confirm) void -BPoseView::Delete(BObjectList* list, bool selectNext, bool confirm) +BPoseView::Delete(BObjectList* list, bool selectNext, bool confirm) { if (list->CountItems() == 0) { delete list; return; } - BObjectList* taskList = new BObjectList(2, true); + BObjectList* taskList = new BObjectList(2); // first move selection to trash, taskList->AddItem(NewFunctionObject(FSDeleteRefList, list, false, confirm)); @@ -6306,14 +6304,14 @@ BPoseView::Delete(BObjectList* list, bool selectNext, bool confirm) void -BPoseView::RestoreItemsFromTrash(BObjectList* list, bool selectNext) +BPoseView::RestoreItemsFromTrash(BObjectList* list, bool selectNext) { if (list->CountItems() == 0) { delete list; return; } - BObjectList* taskList = new BObjectList(2, true); + BObjectList* taskList = new BObjectList(2); // first restoree selection taskList->AddItem(NewFunctionObject(FSRestoreRefList, list, false)); @@ -7190,7 +7188,7 @@ BPoseView::_EndSelectionRect() fSelectionList->MakeEmpty(); fMimeTypesInSelectionCache.MakeEmpty(); - EachListItem(fPoseList, AddIfPoseSelected, fSelectionList); + fPoseList->EachListItem(AddIfPoseSelected, fSelectionList); // and now make sure that the pivot point is in sync if (fSelectionPivotPose && !fSelectionList->HasItem(fSelectionPivotPose)) @@ -7779,7 +7777,7 @@ BPoseView::SelectPoses(BRect selectionRect, BList** oldList) if (inListMode) listLoc.Set(0, startIndex * fListElemHeight); - PoseList* poseList = inListMode ? CurrentPoseList() : fVSPoseList; + const PoseList* poseList = inListMode ? CurrentPoseList() : fVSPoseList; const int32 poseCount = inListMode ? poseList->CountItems() : fPoseList->CountItems(); for (int32 index = startIndex; index < poseCount; index++) { BPose* pose = poseList->ItemAt(index); @@ -7873,7 +7871,7 @@ BPoseView::AddRemoveSelectionRange(BPoint where, bool extendSelection, } if (ViewMode() == kListMode) { - PoseList* poseList = CurrentPoseList(); + const PoseList* poseList = CurrentPoseList(); int32 currentSelectedIndex = poseList->IndexOf(pose); int32 lastSelectedIndex = poseList->IndexOf(fSelectionPivotPose); @@ -8657,7 +8655,7 @@ BPoseView::ClearSelection() int32 startIndex = (int32)(bounds.top / fListElemHeight); BPoint loc(0, startIndex * fListElemHeight); - PoseList* poseList = CurrentPoseList(); + const PoseList* poseList = CurrentPoseList(); int32 poseCount = poseList->CountItems(); for (int32 index = startIndex; index < poseCount; index++) { BPose* pose = poseList->ItemAt(index); @@ -8717,7 +8715,7 @@ BPoseView::ShowSelection(bool show) int32 startIndex = (int32)(bounds.top / fListElemHeight); BPoint loc(0, startIndex * fListElemHeight); - PoseList* poseList = CurrentPoseList(); + const PoseList* poseList = CurrentPoseList(); int32 poseCount = poseList->CountItems(); for (int32 index = startIndex; index < poseCount; index++) { BPose* pose = poseList->ItemAt(index); @@ -9158,7 +9156,7 @@ void BPoseView::DrawViewCommon(const BRect& updateRect) { if (ViewMode() == kListMode) { - PoseList* poseList = CurrentPoseList(); + const PoseList* poseList = CurrentPoseList(); int32 poseCount = poseList->CountItems(); int32 startIndex = (int32)((updateRect.top - fListElemHeight) / fListElemHeight); @@ -9208,7 +9206,7 @@ BPoseView::ColumnRedraw(BRect updateRect) if (startIndex < 0) startIndex = 0; - PoseList* poseList = CurrentPoseList(); + const PoseList* poseList = CurrentPoseList(); int32 poseCount = poseList->CountItems(); if (poseCount <= 0) return; @@ -9532,12 +9530,11 @@ BPoseView::SortPoses() PRINT(("===================\n")); #endif - BPose** poses = reinterpret_cast( - PoseList::Private(fPoseList).AsBList()->Items()); + BPose** poses = reinterpret_cast(fPoseList->AsBList()->Items()); std::stable_sort(poses, &poses[fPoseList->CountItems()], PoseComparator(this)); if (IsFiltering()) { - poses = reinterpret_cast(PoseList::Private(fFilteredPoseList).AsBList()->Items()); + poses = reinterpret_cast(fPoseList->AsBList()->Items()); std::stable_sort(poses, &poses[fFilteredPoseList->CountItems()], PoseComparator(this)); } } diff --git a/src/kits/tracker/PoseView.h b/src/kits/tracker/PoseView.h index 24955ea6c0..28b53066e3 100644 --- a/src/kits/tracker/PoseView.h +++ b/src/kits/tracker/PoseView.h @@ -671,11 +671,11 @@ protected: BList* GetDropPointList(BPoint dropPoint, BPoint startPoint, const PoseList*, bool sourceInListMode, bool dropOnGrid) const; void SendSelectionAsRefs(uint32 what, bool onlyQueries = false); - void MoveListToTrash(BObjectList*, bool selectNext, + void MoveListToTrash(BObjectList*, bool selectNext, bool deleteDirectly); - void Delete(BObjectList*, bool selectNext, bool confirm); - void Delete(const entry_ref&ref, bool selectNext, bool confirm); - void RestoreItemsFromTrash(BObjectList*, bool selectNext); + void Delete(BObjectList*, bool selectNext, bool confirm); + void Delete(const entry_ref& ref, bool selectNext, bool confirm); + void RestoreItemsFromTrash(BObjectList*, bool selectNext); void DoDelete(); void DoMoveToTrash(); @@ -748,8 +748,8 @@ private: HashSet fInsertedNodes; BStringList fMimeTypesInSelectionCache; // used for mime string based icon highliting during a drag - BObjectList* fZombieList; - BObjectList* fColumnList; + BObjectList* fZombieList; + BObjectList* fColumnList; BStringList fMimeTypeList; BObjectList* fBrokenLinks; bool fMimeTypeListIsDirty; @@ -811,7 +811,7 @@ private: bool fCursorCheck : 1; bool fTypeAheadFiltering : 1; - BObjectList fFilterStrings; + BObjectList fFilterStrings; int32 fLastFilterStringCount; int32 fLastFilterStringLength; diff --git a/src/kits/tracker/PoseViewScripting.cpp b/src/kits/tracker/PoseViewScripting.cpp index 75198f57df..669a29094f 100644 --- a/src/kits/tracker/PoseViewScripting.cpp +++ b/src/kits/tracker/PoseViewScripting.cpp @@ -421,7 +421,7 @@ BPoseView::DeleteProperty(BMessage* specifier, int32 form, // deleting entries is handled by moving entries to trash // build a list of entries, specified by the specifier - BObjectList* entryList = new BObjectList(); + BObjectList* entryList = new BObjectList(); // list will be deleted for us by the trashing thread if (form == (int32)B_ENTRY_SPECIFIER) { diff --git a/src/kits/tracker/QueryPoseView.cpp b/src/kits/tracker/QueryPoseView.cpp index 592fc98dc2..697455ac99 100644 --- a/src/kits/tracker/QueryPoseView.cpp +++ b/src/kits/tracker/QueryPoseView.cpp @@ -270,7 +270,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) // dynamic date query during a Refresh call PoseList* oldPoseList = NULL; if (fCreateOldPoseList) { - oldPoseList = new PoseList(10, false); + oldPoseList = new PoseList(10); oldPoseList->AddList(fPoseList); } @@ -522,7 +522,7 @@ QueryRefFilter::Filter(const entry_ref* ref, BNode* node, stat_beos* st, QueryEntryListCollection::QueryEntryListCollection(Model* model, BHandler* target, PoseList* oldPoseList) : - fQueryListRep(new QueryListRep(new BObjectList(5, true))) + fQueryListRep(new QueryListRep(new BObjectList(5))) { Rewind(); attr_info info; @@ -650,7 +650,7 @@ QueryEntryListCollection::QueryEntryListCollection(Model* model, status_t QueryEntryListCollection::FetchOneQuery(const BQuery* copyThis, - BHandler* target, BObjectList* list, BVolume* volume) + BHandler* target, BObjectList* list, BVolume* volume) { BQuery* query = new (nothrow) BQuery; if (query == NULL) diff --git a/src/kits/tracker/QueryPoseView.h b/src/kits/tracker/QueryPoseView.h index 2d535fa1ef..cfdfc66f98 100644 --- a/src/kits/tracker/QueryPoseView.h +++ b/src/kits/tracker/QueryPoseView.h @@ -84,7 +84,7 @@ private: mutable BString fSearchForMimeType; BRefFilter* fRefFilter; - BObjectList* fQueryList; + BObjectList* fQueryList; QueryEntryListCollection* fQueryListContainer; bool fCreateOldPoseList; @@ -118,7 +118,7 @@ class QueryEntryListCollection : public EntryListBase { class QueryListRep { public: - QueryListRep(BObjectList* queryList) + QueryListRep(BObjectList* queryList) : fQueryList(queryList), fRefCount(0), @@ -138,7 +138,7 @@ class QueryEntryListCollection : public EntryListBase { delete fOldPoseList; } - BObjectList* OpenQueryList() + BObjectList* OpenQueryList() { fRefCount++; return fQueryList; @@ -149,7 +149,7 @@ class QueryEntryListCollection : public EntryListBase { return atomic_add(&fRefCount, -1) == 0; } - BObjectList* fQueryList; + BObjectList* fQueryList; int32 fRefCount; bool fShowResultsFromTrash; int32 fQueryListIndex; @@ -170,7 +170,7 @@ public: QueryEntryListCollection* Clone(); - BObjectList* QueryList() const + BObjectList* QueryList() const { return fQueryListRep->fQueryList; } @@ -198,7 +198,7 @@ private: QueryEntryListCollection(const QueryEntryListCollection&); // only to be used by the Clone routine status_t FetchOneQuery(const BQuery*, BHandler* target, - BObjectList*, BVolume*); + BObjectList*, BVolume*); QueryListRep* fQueryListRep; }; diff --git a/src/kits/tracker/TaskLoop.cpp b/src/kits/tracker/TaskLoop.cpp index ceb96d057d..d676fe7e70 100644 --- a/src/kits/tracker/TaskLoop.cpp +++ b/src/kits/tracker/TaskLoop.cpp @@ -325,7 +325,7 @@ RunWhenIdleTask::StillIdle(bigtime_t currentTime) TaskLoop::TaskLoop(bigtime_t heartBeat) : - fTaskList(10, true), + fTaskList(10), fHeartBeat(heartBeat) { } diff --git a/src/kits/tracker/TaskLoop.h b/src/kits/tracker/TaskLoop.h index cca285273e..e7564dcd3c 100644 --- a/src/kits/tracker/TaskLoop.h +++ b/src/kits/tracker/TaskLoop.h @@ -201,7 +201,7 @@ protected: virtual void StartPulsingIfNeeded() = 0; BLocker fLock; - BObjectList fTaskList; + BObjectList fTaskList; bigtime_t fHeartBeat; }; diff --git a/src/kits/tracker/TitleView.cpp b/src/kits/tracker/TitleView.cpp index 7e49ad7151..45363d28a2 100644 --- a/src/kits/tracker/TitleView.cpp +++ b/src/kits/tracker/TitleView.cpp @@ -102,7 +102,7 @@ BTitleView::BTitleView(BPoseView* view) : BView("TitleView", B_WILL_DRAW), fPoseView(view), - fTitleList(10, true), + fTitleList(10), fHorizontalResizeCursor(B_CURSOR_ID_RESIZE_EAST_WEST), fPreviouslyClickedColumnTitle(0), fPreviousLeftClickTime(0), diff --git a/src/kits/tracker/TitleView.h b/src/kits/tracker/TitleView.h index ab65772f67..750a73310a 100644 --- a/src/kits/tracker/TitleView.h +++ b/src/kits/tracker/TitleView.h @@ -93,7 +93,7 @@ private: private: BPoseView* fPoseView; - BObjectList fTitleList; + BObjectList fTitleList; BCursor fHorizontalResizeCursor; float fPreferredHeight; diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index c7c63b5e94..d529e85f4a 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -688,7 +688,7 @@ TTracker::MoveRefsToTrash(const BMessage* message) if (count <= 0) return; - BObjectList* srcList = new BObjectList(count, true); + BObjectList* srcList = new BObjectList(count); for (int32 index = 0; index < count; index++) { entry_ref ref; diff --git a/src/kits/tracker/TrashWatcher.cpp b/src/kits/tracker/TrashWatcher.cpp index 1b5d58463f..8d60d0cc4c 100644 --- a/src/kits/tracker/TrashWatcher.cpp +++ b/src/kits/tracker/TrashWatcher.cpp @@ -56,7 +56,7 @@ All rights reserved. BTrashWatcher::BTrashWatcher() : BLooper("TrashWatcher", B_LOW_PRIORITY), - fTrashNodeList(20, true) + fTrashNodeList(20) { FSCreateTrashDirs(); WatchTrashDirs(); diff --git a/src/kits/tracker/TrashWatcher.h b/src/kits/tracker/TrashWatcher.h index 7a7fe54dd4..0f2dda419a 100644 --- a/src/kits/tracker/TrashWatcher.h +++ b/src/kits/tracker/TrashWatcher.h @@ -60,7 +60,7 @@ private: void UpdateTrashIcons(); bool fTrashFull; - BObjectList fTrashNodeList; + BObjectList fTrashNodeList; typedef BLooper _inherited; }; diff --git a/src/kits/tracker/Utilities.cpp b/src/kits/tracker/Utilities.cpp index 4ea2a07b60..ecf08b5805 100644 --- a/src/kits/tracker/Utilities.cpp +++ b/src/kits/tracker/Utilities.cpp @@ -203,7 +203,7 @@ DisallowMetaKeys(BTextView* textView) PeriodicUpdatePoses::PeriodicUpdatePoses() : - fPoseList(20, true) + fPoseList(20) { fLock = new Benaphore("PeriodicUpdatePoses"); } diff --git a/src/kits/tracker/Utilities.h b/src/kits/tracker/Utilities.h index 709d41cf5f..2e79cbc3d4 100644 --- a/src/kits/tracker/Utilities.h +++ b/src/kits/tracker/Utilities.h @@ -114,7 +114,7 @@ private: }; Benaphore* fLock; - BObjectList fPoseList; + BObjectList fPoseList; }; extern PeriodicUpdatePoses gPeriodicUpdatePoses; diff --git a/src/kits/tracker/VirtualDirectoryManager.cpp b/src/kits/tracker/VirtualDirectoryManager.cpp index f2f1d414fb..d0ab26a102 100644 --- a/src/kits/tracker/VirtualDirectoryManager.cpp +++ b/src/kits/tracker/VirtualDirectoryManager.cpp @@ -39,7 +39,7 @@ static const char* const kTemporaryDefinitionFileBaseDirectoryPath class VirtualDirectoryManager::Info { private: - typedef BObjectList InfoList; + typedef BObjectList InfoList; public: Info(RootInfo* root, Info* parent, const BString& path, @@ -53,7 +53,7 @@ public: fDefinitionFileEntryRef(definitionFileEntryRef), fId(), fChildDefinitionsDirectoryRef(-1, -1), - fChildren(10, true) + fChildren(10) { } diff --git a/src/libs/alm/SharedSolver.cpp b/src/libs/alm/SharedSolver.cpp index 10a83d0a04..e113f7d4da 100644 --- a/src/libs/alm/SharedSolver.cpp +++ b/src/libs/alm/SharedSolver.cpp @@ -380,7 +380,7 @@ SharedSolver::_InstantiateConstraint(const void* rawData, ssize_t numBytes, int32 summandCount; buffer.Read((void*)&summandCount, sizeof(summandCount)); - SummandList* summandList = new SummandList(20, true); + SummandList* summandList = new SummandList(20); ObjectDeleter deleter(summandList); status_t err = B_OK; for (int32 i = 0; i < summandCount; i++) { diff --git a/src/libs/libsolv/ext/repo_haiku.cpp b/src/libs/libsolv/ext/repo_haiku.cpp index a624df17bf..7e9d9e6bd6 100644 --- a/src/libs/libsolv/ext/repo_haiku.cpp +++ b/src/libs/libsolv/ext/repo_haiku.cpp @@ -48,7 +48,7 @@ static void add_dependency(Repo *repo, Offset &dependencies, const char *name, } static void add_resolvables(Repo *repo, Offset &dependencies, - const BObjectList &resolvables) + const BObjectList &resolvables) { for (int32 i = 0; BPackageResolvable *resolvable = resolvables.ItemAt(i); i++) { @@ -59,7 +59,7 @@ static void add_resolvables(Repo *repo, Offset &dependencies, } static void add_resolvable_expressions(Repo *repo, Offset &dependencies, - const BObjectList &expressions) + const BObjectList &expressions) { for (int32 i = 0; BPackageResolvableExpression *expression = expressions.ItemAt(i); i++) diff --git a/src/libs/linprog/Constraint.cpp b/src/libs/linprog/Constraint.cpp index 9d0596b5df..ac375b91a4 100644 --- a/src/libs/linprog/Constraint.cpp +++ b/src/libs/linprog/Constraint.cpp @@ -391,8 +391,6 @@ Constraint::~Constraint() { Invalidate(); - for (int32 i = 0; i < fLeftSide->CountItems(); i++) - delete fLeftSide->ItemAt(i); delete fLeftSide; fLeftSide = NULL; } diff --git a/src/libs/linprog/LinearSpec.cpp b/src/libs/linprog/LinearSpec.cpp index bdb5d39884..559022c425 100644 --- a/src/libs/linprog/LinearSpec.cpp +++ b/src/libs/linprog/LinearSpec.cpp @@ -547,8 +547,6 @@ LinearSpec::_CheckSummandList(SummandList* list) if (ok) return true; - for (int i = 0; i < list->CountItems(); i++) - delete list->ItemAt(i); delete list; return false; } diff --git a/src/preferences/backgrounds/BackgroundImage.cpp b/src/preferences/backgrounds/BackgroundImage.cpp index e0a8a4449c..7c701ead8f 100644 --- a/src/preferences/backgrounds/BackgroundImage.cpp +++ b/src/preferences/backgrounds/BackgroundImage.cpp @@ -201,7 +201,7 @@ BackgroundImage::BackgroundImage(const BNode* node, bool desktop, fView(NULL), fBackgroundsView(view), fShowingBitmap(NULL), - fBitmapForWorkspaceList(1, true), + fBitmapForWorkspaceList(1), fImageSetPeriod(0), fShowingImageSet(0), fImageSetCount(0), diff --git a/src/preferences/backgrounds/BackgroundImage.h b/src/preferences/backgrounds/BackgroundImage.h index 1e4ca03c80..1213d7a147 100644 --- a/src/preferences/backgrounds/BackgroundImage.h +++ b/src/preferences/backgrounds/BackgroundImage.h @@ -149,7 +149,7 @@ private: BackgroundsView* fBackgroundsView; BackgroundImageInfo* fShowingBitmap; - BObjectList fBitmapForWorkspaceList; + BObjectList fBitmapForWorkspaceList; uint32 fImageSetPeriod; // period between imagesets, 0 if none uint32 fShowingImageSet; // current imageset diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 35a034c2b7..1fb645a189 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -74,8 +74,8 @@ BackgroundsView::BackgroundsView() fCurrentInfo(NULL), fLastImageIndex(-1), fRecentFoldersLimit(10), - fPathList(1, true), - fImageList(1, true), + fPathList(1), + fImageList(1), fFoundPositionSetting(false) { SetBorder(B_NO_BORDER); diff --git a/src/preferences/backgrounds/BackgroundsView.h b/src/preferences/backgrounds/BackgroundsView.h index e97ecfeda5..a9fbc43c44 100644 --- a/src/preferences/backgrounds/BackgroundsView.h +++ b/src/preferences/backgrounds/BackgroundsView.h @@ -163,8 +163,8 @@ protected: int32 fRecentFoldersLimit; BMessage fSettings; - BObjectList fPathList; - BObjectList fImageList; + BObjectList fPathList; + BObjectList fImageList; FramePart* fTopLeft; FramePart* fTop; diff --git a/src/preferences/filetypes/AttributeListView.cpp b/src/preferences/filetypes/AttributeListView.cpp index fec36dc8cf..c170d8db65 100644 --- a/src/preferences/filetypes/AttributeListView.cpp +++ b/src/preferences/filetypes/AttributeListView.cpp @@ -313,7 +313,7 @@ AttributeListView::SetTo(BMimeType* type) // Remove the current items but remember them for now. Also remember // the currently selected item. - BObjectList previousItems(CountItems(), true); + BObjectList previousItems(CountItems()); while (AttributeItem* item = (AttributeItem*)RemoveItem((int32)0)) previousItems.AddItem(item); diff --git a/src/preferences/keymap/KeyboardLayout.cpp b/src/preferences/keymap/KeyboardLayout.cpp index c8d06a84f5..cc9ee6a9d6 100644 --- a/src/preferences/keymap/KeyboardLayout.cpp +++ b/src/preferences/keymap/KeyboardLayout.cpp @@ -31,7 +31,7 @@ KeyboardLayout::KeyboardLayout() fKeys(NULL), fKeyCount(0), fKeyCapacity(0), - fIndicators(5, true), + fIndicators(5), fIsDefault(true) { SetDefault(); diff --git a/src/preferences/keymap/KeyboardLayout.h b/src/preferences/keymap/KeyboardLayout.h index 18627e464e..325da1703a 100644 --- a/src/preferences/keymap/KeyboardLayout.h +++ b/src/preferences/keymap/KeyboardLayout.h @@ -112,7 +112,7 @@ private: BRect fBounds; BSize fDefaultKeySize; int32 fAlternateIndex[3]; - BObjectList fIndicators; + BObjectList fIndicators; bool fIsDefault; }; diff --git a/src/preferences/mail/AutoConfig.cpp b/src/preferences/mail/AutoConfig.cpp index 45d612b332..50bb94a22c 100644 --- a/src/preferences/mail/AutoConfig.cpp +++ b/src/preferences/mail/AutoConfig.cpp @@ -31,7 +31,7 @@ AutoConfig::GetInfoFromMailAddress(const char* email, provider_info *info) status_t AutoConfig::GetMXRecord(const char* provider, provider_info *info) { - BObjectList mxList(5, true); + BObjectList mxList(5); DNSQuery dnsQuery; if (dnsQuery.GetMXRecords(provider, &mxList) != B_OK) return B_ERROR; diff --git a/src/preferences/mail/DNSQuery.cpp b/src/preferences/mail/DNSQuery.cpp index cfe57c4c79..e916016823 100644 --- a/src/preferences/mail/DNSQuery.cpp +++ b/src/preferences/mail/DNSQuery.cpp @@ -155,7 +155,7 @@ BRawNetBuffer::_ReadStringAt(BString& string, off_t pos) status_t -DNSTools::GetDNSServers(BObjectList* serverList) +DNSTools::GetDNSServers(BObjectList* serverList) { // TODO: reading resolv.conf ourselves shouldn't be needed. // we should have some function to retrieve the dns list @@ -283,7 +283,7 @@ status_t DNSQuery::ReadDNSServer(in_addr* add) { // list owns the items - BObjectList dnsServerList(5, true); + BObjectList dnsServerList(5); status_t status = DNSTools::GetDNSServers(&dnsServerList); if (status != B_OK) return status; @@ -299,7 +299,7 @@ DNSQuery::ReadDNSServer(in_addr* add) status_t DNSQuery::GetMXRecords(const BString& serverName, - BObjectList* mxList, bigtime_t timeout) + BObjectList* mxList, bigtime_t timeout) { // get the DNS server to ask for the mx record in_addr dnsAddress; diff --git a/src/preferences/mail/DNSQuery.h b/src/preferences/mail/DNSQuery.h index 600b4bbd5a..e77dd1f315 100644 --- a/src/preferences/mail/DNSQuery.h +++ b/src/preferences/mail/DNSQuery.h @@ -52,7 +52,7 @@ private: class DNSTools { public: - static status_t GetDNSServers(BObjectList* serverList); + static status_t GetDNSServers(BObjectList* serverList); static BString ConvertToDNSName(const BString& string); static BString ConvertFromDNSName(const BString& string); }; @@ -100,7 +100,7 @@ public: ~DNSQuery(); status_t ReadDNSServer(in_addr* add); status_t GetMXRecords(const BString& serverName, - BObjectList* mxList, + BObjectList* mxList, bigtime_t timeout = 500000); private: diff --git a/src/preferences/media/MediaViews.h b/src/preferences/media/MediaViews.h index fc47786377..dc87cd558f 100644 --- a/src/preferences/media/MediaViews.h +++ b/src/preferences/media/MediaViews.h @@ -72,7 +72,7 @@ private: class SettingsView : public BGroupView { public: - typedef BObjectList NodeList; + typedef BObjectList NodeList; SettingsView(); void AddInputNodes(NodeList& nodes); diff --git a/src/preferences/media/MediaWindow.cpp b/src/preferences/media/MediaWindow.cpp index 88a2bab960..4384baf7ec 100644 --- a/src/preferences/media/MediaWindow.cpp +++ b/src/preferences/media/MediaWindow.cpp @@ -179,10 +179,10 @@ MediaWindow::MediaWindow(BRect frame) B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS), fCurrentNode(BMessenger(this)), fParamWeb(NULL), - fAudioInputs(5, true), - fAudioOutputs(5, true), - fVideoInputs(5, true), - fVideoOutputs(5, true), + fAudioInputs(5), + fAudioOutputs(5), + fVideoInputs(5), + fVideoOutputs(5), fInitCheck(B_OK), fRestartThread(-1), fRestartAlert(NULL) diff --git a/src/preferences/media/MediaWindow.h b/src/preferences/media/MediaWindow.h index a9390bf080..94f46b9d03 100644 --- a/src/preferences/media/MediaWindow.h +++ b/src/preferences/media/MediaWindow.h @@ -56,7 +56,7 @@ public: virtual void MessageReceived(BMessage* message); private: - typedef BObjectList NodeList; + typedef BObjectList NodeList; void _InitWindow(); status_t _InitMedia(bool first); diff --git a/src/servers/app/DelayedMessage.cpp b/src/servers/app/DelayedMessage.cpp index 181b2205d3..9f12a17072 100644 --- a/src/servers/app/DelayedMessage.cpp +++ b/src/servers/app/DelayedMessage.cpp @@ -40,7 +40,7 @@ struct Attachment { }; -typedef BObjectList AttachmentList; +typedef BObjectList AttachmentList; /*! \class ScheduledMessage @@ -86,7 +86,7 @@ private: void _Wakeup(bigtime_t whatTime); private: - typedef BObjectList ScheduledList; + typedef BObjectList ScheduledList; mutable BLocker fLock; ScheduledList fMessages; @@ -109,8 +109,9 @@ DelayedMessageSender gDelayedMessageSender; when needed, */ class DelayedMessageData { - typedef BObjectList PortList; + typedef BObjectList PortList; typedef void(*FailureCallback)(int32 code, port_id port, void* data); + public: DelayedMessageData(int32 code, bigtime_t delay, bool isSpecificTime); @@ -302,8 +303,8 @@ DelayedMessageData::DelayedMessageData(int32 code, bigtime_t delay, fScheduledTime(delay + (isSpecificTime ? 0 : system_time())), fValid(false), - fAttachments(3, true), - fTargets(4, true), + fAttachments(3), + fTargets(4), fMergeMode(DM_NO_MERGE), fMergeMask(DM_DATA_DEFAULT), @@ -663,7 +664,7 @@ CompareMessages(const ScheduledMessage* one, const ScheduledMessage* two) DelayedMessageSender::DelayedMessageSender() : fLock("DelayedMessageSender"), - fMessages(20, true), + fMessages(20), fScheduledWakeup(B_INFINITE_TIMEOUT), fWakeupRetry(0), fThread(spawn_thread(&_thread_func, kName, kPriority, this)), diff --git a/src/servers/app/EventDispatcher.cpp b/src/servers/app/EventDispatcher.cpp index 3ec8842677..6bcab862e6 100644 --- a/src/servers/app/EventDispatcher.cpp +++ b/src/servers/app/EventDispatcher.cpp @@ -84,7 +84,7 @@ static const float kListenerImportance = 0.8f; EventTarget::EventTarget() : - fListeners(2, true) + fListeners(2) { } diff --git a/src/servers/app/EventDispatcher.h b/src/servers/app/EventDispatcher.h index 2a5c64aa9b..6ff3c22cf9 100644 --- a/src/servers/app/EventDispatcher.h +++ b/src/servers/app/EventDispatcher.h @@ -51,7 +51,7 @@ class EventTarget { private: bool _RemoveTemporaryListener(event_listener* listener, int32 index); - BObjectList fListeners; + BObjectList fListeners; BMessenger fMessenger; }; diff --git a/src/servers/app/InputManager.cpp b/src/servers/app/InputManager.cpp index de87fa99c8..8e3a580e4a 100644 --- a/src/servers/app/InputManager.cpp +++ b/src/servers/app/InputManager.cpp @@ -22,8 +22,8 @@ InputManager* gInputManager; InputManager::InputManager() : BLocker("input manager"), - fFreeStreams(2, true), - fUsedStreams(2, true) + fFreeStreams(2), + fUsedStreams(2) { } @@ -99,5 +99,3 @@ InputManager::UpdateScreenBounds(BRect bounds) fFreeStreams.ItemAt(i)->UpdateScreenBounds(bounds); } } - - diff --git a/src/servers/app/InputManager.h b/src/servers/app/InputManager.h index 2cea81f698..2a20fa4027 100644 --- a/src/servers/app/InputManager.h +++ b/src/servers/app/InputManager.h @@ -29,8 +29,8 @@ class InputManager : public BLocker { void PutStream(EventStream* stream); private: - BObjectList fFreeStreams; - BObjectList fUsedStreams; + BObjectList fFreeStreams; + BObjectList fUsedStreams; }; extern InputManager* gInputManager; diff --git a/src/servers/app/ScreenConfigurations.cpp b/src/servers/app/ScreenConfigurations.cpp index 36656d532d..2e1c120ad2 100644 --- a/src/servers/app/ScreenConfigurations.cpp +++ b/src/servers/app/ScreenConfigurations.cpp @@ -15,7 +15,7 @@ ScreenConfigurations::ScreenConfigurations() : - fConfigurations(10, true) + fConfigurations(10) { } diff --git a/src/servers/app/ScreenConfigurations.h b/src/servers/app/ScreenConfigurations.h index b992b72893..2205aadfe6 100644 --- a/src/servers/app/ScreenConfigurations.h +++ b/src/servers/app/ScreenConfigurations.h @@ -46,7 +46,7 @@ public: status_t Restore(const BMessage& settings); private: - typedef BObjectList ConfigurationList; + typedef BObjectList ConfigurationList; ConfigurationList fConfigurations; }; diff --git a/src/servers/app/ScreenManager.cpp b/src/servers/app/ScreenManager.cpp index afd2d0b080..b3299ad545 100644 --- a/src/servers/app/ScreenManager.cpp +++ b/src/servers/app/ScreenManager.cpp @@ -68,7 +68,7 @@ ScreenChangeListener::ScreenChanged(HWInterface* interface) ScreenManager::ScreenManager() : BLooper("screen manager"), - fScreenList(4, true) + fScreenList(4) { #ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST # if defined(USE_DIRECT_WINDOW_TEST_MODE) diff --git a/src/servers/app/ScreenManager.h b/src/servers/app/ScreenManager.h index e9cb04a28d..f8c762a8ef 100644 --- a/src/servers/app/ScreenManager.h +++ b/src/servers/app/ScreenManager.h @@ -64,7 +64,7 @@ class ScreenManager : public BLooper { void _ScanDrivers(); screen_item* _AddHWInterface(HWInterface* interface); - BObjectList fScreenList; + BObjectList fScreenList; }; extern ScreenManager *gScreenManager; diff --git a/src/servers/app/ServerFont.cpp b/src/servers/app/ServerFont.cpp index 566c682007..045fe5dcf4 100644 --- a/src/servers/app/ServerFont.cpp +++ b/src/servers/app/ServerFont.cpp @@ -700,7 +700,7 @@ ServerFont::GetHasGlyphs(const char* string, int32 numBytes, int32 numChars, boo FontCacheEntry* entry = NULL; FontCacheReference cacheReference; - BObjectList fallbacks(21, true); + BObjectList fallbacks(21); entry = GlyphLayoutEngine::FontCacheEntryFor(*this, false); if (entry == NULL) diff --git a/src/servers/app/VirtualScreen.cpp b/src/servers/app/VirtualScreen.cpp index 4855fcb3c6..a03c9d8b07 100644 --- a/src/servers/app/VirtualScreen.cpp +++ b/src/servers/app/VirtualScreen.cpp @@ -17,7 +17,7 @@ VirtualScreen::VirtualScreen() : - fScreenList(4, true), + fScreenList(4), fDrawingEngine(NULL), fHWInterface(NULL) { diff --git a/src/servers/app/VirtualScreen.h b/src/servers/app/VirtualScreen.h index b370add7b1..ab88e99115 100644 --- a/src/servers/app/VirtualScreen.h +++ b/src/servers/app/VirtualScreen.h @@ -67,7 +67,7 @@ private: }; BRect fFrame; - BObjectList fScreenList; + BObjectList fScreenList; ::DrawingEngine* fDrawingEngine; ::HWInterface* fHWInterface; }; diff --git a/src/servers/app/drawing/interface/remote/RemoteEventStream.cpp b/src/servers/app/drawing/interface/remote/RemoteEventStream.cpp index 11a6a0c9ec..2a3f242798 100644 --- a/src/servers/app/drawing/interface/remote/RemoteEventStream.cpp +++ b/src/servers/app/drawing/interface/remote/RemoteEventStream.cpp @@ -18,7 +18,7 @@ RemoteEventStream::RemoteEventStream() : - fEventList(10, true), + fEventList(10), fEventListLocker("remote event list"), fEventNotification(-1), fWaitingOnEvent(false), diff --git a/src/servers/app/drawing/interface/remote/RemoteEventStream.h b/src/servers/app/drawing/interface/remote/RemoteEventStream.h index 95366b89d7..a3a57d69e2 100644 --- a/src/servers/app/drawing/interface/remote/RemoteEventStream.h +++ b/src/servers/app/drawing/interface/remote/RemoteEventStream.h @@ -31,7 +31,7 @@ virtual BMessage* PeekLatestMouseMoved(); bool EventReceived(RemoteMessage& message); private: - BObjectList fEventList; + BObjectList fEventList; BLocker fEventListLocker; sem_id fEventNotification; bool fWaitingOnEvent; diff --git a/src/servers/app/font/GlobalFontManager.cpp b/src/servers/app/font/GlobalFontManager.cpp index 0f75b19e8d..594a385469 100644 --- a/src/servers/app/font/GlobalFontManager.cpp +++ b/src/servers/app/font/GlobalFontManager.cpp @@ -101,8 +101,8 @@ set_entry(node_ref& nodeRef, const char* name, BEntry& entry) //! Does basic set up so that directories can be scanned GlobalFontManager::GlobalFontManager() : BLooper("GlobalFontManager"), - fDirectories(10, true), - fMappings(10, true), + fDirectories(10), + fMappings(10), fDefaultPlainFont(NULL), fDefaultBoldFont(NULL), diff --git a/src/servers/app/font/GlobalFontManager.h b/src/servers/app/font/GlobalFontManager.h index 45c4b0d2b1..31860adee2 100644 --- a/src/servers/app/font/GlobalFontManager.h +++ b/src/servers/app/font/GlobalFontManager.h @@ -105,8 +105,8 @@ private: private: status_t fInitStatus; - typedef BObjectList DirectoryList; - typedef BObjectList MappingList; + typedef BObjectList DirectoryList; + typedef BObjectList MappingList; DirectoryList fDirectories; MappingList fMappings; diff --git a/src/servers/app/font/GlyphLayoutEngine.h b/src/servers/app/font/GlyphLayoutEngine.h index 610d2dd375..85ecf015be 100644 --- a/src/servers/app/font/GlyphLayoutEngine.h +++ b/src/servers/app/font/GlyphLayoutEngine.h @@ -204,17 +204,17 @@ public: FontCacheReference* cacheReference = NULL); static void PopulateFallbacks( - BObjectList& fallbacks, + BObjectList& fallbacks, const ServerFont& font, bool forceVector); static FontCacheReference* GetFallbackReference( - BObjectList& fallbacks, + BObjectList& fallbacks, uint32 charCode); private: static const GlyphCache* _CreateGlyph( FontCacheReference& cacheReference, - BObjectList& fallbacks, + BObjectList& fallbacks, const ServerFont& font, bool needsVector, uint32 glyphCode); @@ -264,7 +264,7 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer, FontCacheEntry* entry = NULL; FontCacheReference* pCacheReference; FontCacheReference cacheReference; - BObjectList fallbacksList(21, true); + BObjectList fallbacksList(21); if (_cacheReference != NULL) { pCacheReference = _cacheReference; @@ -374,7 +374,7 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer, inline const GlyphCache* GlyphLayoutEngine::_CreateGlyph(FontCacheReference& cacheReference, - BObjectList& fallbacks, + BObjectList& fallbacks, const ServerFont& font, bool forceVector, uint32 charCode) { FontCacheEntry* entry = cacheReference.Entry(); @@ -406,7 +406,7 @@ GlyphLayoutEngine::_CreateGlyph(FontCacheReference& cacheReference, inline void GlyphLayoutEngine::PopulateFallbacks( - BObjectList& fallbacksList, + BObjectList& fallbacksList, const ServerFont& font, bool forceVector) { ASSERT(fallbacksList.IsEmpty()); @@ -474,7 +474,7 @@ GlyphLayoutEngine::PopulateFallbacks( inline FontCacheReference* GlyphLayoutEngine::GetFallbackReference( - BObjectList& fallbacks, uint32 charCode) + BObjectList& fallbacks, uint32 charCode) { int32 count = fallbacks.CountItems(); for (int32 index = 0; index < count; index++) { diff --git a/src/servers/input/PathList.cpp b/src/servers/input/PathList.cpp index 07c8814e37..f5e5b2a7a0 100644 --- a/src/servers/input/PathList.cpp +++ b/src/servers/input/PathList.cpp @@ -34,7 +34,7 @@ struct PathList::path_entry { PathList::PathList() : - fPaths(10, true) + fPaths(10) { } diff --git a/src/servers/input/PathList.h b/src/servers/input/PathList.h index d8892498c6..9aa4600dcd 100644 --- a/src/servers/input/PathList.h +++ b/src/servers/input/PathList.h @@ -27,7 +27,7 @@ public: private: struct path_entry; - BObjectList fPaths; + BObjectList fPaths; }; #endif // _DEVICE_MANAGER_H diff --git a/src/servers/keystore/KeyStoreServer.cpp b/src/servers/keystore/KeyStoreServer.cpp index 41b1732945..31b3288329 100644 --- a/src/servers/keystore/KeyStoreServer.cpp +++ b/src/servers/keystore/KeyStoreServer.cpp @@ -61,7 +61,7 @@ KeyStoreServer::KeyStoreServer() : BApplication(kKeyStoreServerSignature), fMasterKeyring(NULL), - fKeyrings(20, true) + fKeyrings(20) { BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) diff --git a/src/servers/keystore/KeyStoreServer.h b/src/servers/keystore/KeyStoreServer.h index 4ab7a460fb..2820051a6c 100644 --- a/src/servers/keystore/KeyStoreServer.h +++ b/src/servers/keystore/KeyStoreServer.h @@ -15,7 +15,7 @@ struct app_info; class Keyring; -typedef BObjectList KeyringList; +typedef BObjectList KeyringList; class KeyStoreServer : public BApplication { diff --git a/src/servers/launch/Conditions.cpp b/src/servers/launch/Conditions.cpp index e879d06c11..a14c976402 100644 --- a/src/servers/launch/Conditions.cpp +++ b/src/servers/launch/Conditions.cpp @@ -33,7 +33,7 @@ protected: void AddConditionsToString(BString& string) const; protected: - BObjectList fConditions; + BObjectList fConditions; }; @@ -179,7 +179,7 @@ Condition::IsConstant(ConditionContext& context) const ConditionContainer::ConditionContainer(const BMessage& args) : - fConditions(10, true) + fConditions(10) { char* name; type_code type; @@ -197,7 +197,7 @@ ConditionContainer::ConditionContainer(const BMessage& args) ConditionContainer::ConditionContainer() : - fConditions(10, true) + fConditions(10) { } diff --git a/src/servers/launch/Events.cpp b/src/servers/launch/Events.cpp index 7d43734290..7d260bf7f1 100644 --- a/src/servers/launch/Events.cpp +++ b/src/servers/launch/Events.cpp @@ -32,7 +32,7 @@ protected: public: void AddEvent(Event* event); - BObjectList& Events(); + BObjectList& Events(); const BMessenger& Target() const; @@ -50,7 +50,7 @@ protected: protected: BaseJob* fOwner; BMessenger fTarget; - BObjectList fEvents; + BObjectList fEvents; bool fRegistered; }; @@ -252,7 +252,7 @@ EventContainer::EventContainer(Event* parent, const BMessenger* target, const BMessage& args) : Event(parent), - fEvents(5, true), + fEvents(5), fRegistered(false) { if (target != NULL) @@ -277,7 +277,7 @@ EventContainer::EventContainer(BaseJob* owner, const BMessenger& target) Event(NULL), fOwner(owner), fTarget(target), - fEvents(5, true), + fEvents(5), fRegistered(false) { } @@ -291,7 +291,7 @@ EventContainer::AddEvent(Event* event) } -BObjectList& +BObjectList& EventContainer::Events() { return fEvents; diff --git a/src/servers/launch/Job.cpp b/src/servers/launch/Job.cpp index a2211c21a4..b5389278ef 100644 --- a/src/servers/launch/Job.cpp +++ b/src/servers/launch/Job.cpp @@ -34,7 +34,7 @@ Job::Job(const char* name) fToken((uint32)B_PREFERRED_TOKEN), fLaunchStatus(B_NO_INIT), fTarget(NULL), - fPendingLaunchDataReplies(0, false), + fPendingLaunchDataReplies(0), fTeamListener(NULL) { mutex_init(&fLaunchStatusLock, "launch status lock"); @@ -54,7 +54,7 @@ Job::Job(const Job& other) fToken((uint32)B_PREFERRED_TOKEN), fLaunchStatus(B_NO_INIT), fTarget(other.Target()), - fPendingLaunchDataReplies(0, false) + fPendingLaunchDataReplies(0) { mutex_init(&fLaunchStatusLock, "launch status lock"); diff --git a/src/servers/package/CommitTransactionHandler.cpp b/src/servers/package/CommitTransactionHandler.cpp index 5499ef7738..f1196db558 100644 --- a/src/servers/package/CommitTransactionHandler.cpp +++ b/src/servers/package/CommitTransactionHandler.cpp @@ -714,7 +714,7 @@ CommitTransactionHandler::_PreparePackageToActivate(Package* package) _AddGroup(package, groups.StringAt(i)); // add users - const BObjectList& users = package->Info().Users(); + const BObjectList& users = package->Info().Users(); for (int32 i = 0; const BUser* user = users.ItemAt(i); i++) _AddUser(package, *user); @@ -827,7 +827,7 @@ void CommitTransactionHandler::_AddGlobalWritableFiles(Package* package) { // get the list of included files - const BObjectList& files + const BObjectList& files = package->Info().GlobalWritableFileInfos(); BStringList contentPaths; for (int32 i = 0; const BGlobalWritableFileInfo* file = files.ItemAt(i); diff --git a/src/servers/package/PackageDaemon.cpp b/src/servers/package/PackageDaemon.cpp index 8692183a80..83f2ad0b18 100644 --- a/src/servers/package/PackageDaemon.cpp +++ b/src/servers/package/PackageDaemon.cpp @@ -30,7 +30,7 @@ PackageDaemon::PackageDaemon(status_t* _error) : BServer(B_PACKAGE_DAEMON_APP_SIGNATURE, false, _error), fSystemRoot(NULL), - fRoots(10, true), + fRoots(10), fVolumeWatcher() { } diff --git a/src/servers/package/PackageDaemon.h b/src/servers/package/PackageDaemon.h index c2ef13ff2a..8051e15a5d 100644 --- a/src/servers/package/PackageDaemon.h +++ b/src/servers/package/PackageDaemon.h @@ -31,7 +31,7 @@ public: virtual void MessageReceived(BMessage* message); private: - typedef BObjectList RootList; + typedef BObjectList RootList; private: status_t _RegisterVolume(dev_t device); diff --git a/src/servers/registrar/PriorityMessageQueue.cpp b/src/servers/registrar/PriorityMessageQueue.cpp index 0636f1a0d4..a7bed6ac8d 100644 --- a/src/servers/registrar/PriorityMessageQueue.cpp +++ b/src/servers/registrar/PriorityMessageQueue.cpp @@ -28,7 +28,7 @@ private: // constructor PriorityMessageQueue::PriorityMessageQueue() : fLock(), - fMessages(20, true) + fMessages(20) { } diff --git a/src/servers/registrar/PriorityMessageQueue.h b/src/servers/registrar/PriorityMessageQueue.h index 9f64dfd5ea..7da1e29b6b 100644 --- a/src/servers/registrar/PriorityMessageQueue.h +++ b/src/servers/registrar/PriorityMessageQueue.h @@ -33,7 +33,7 @@ private: private: mutable BLocker fLock; - BObjectList fMessages; + BObjectList fMessages; }; #endif // PRIORITY_MESSAGE_QUEUE_H diff --git a/src/tools/update_package_requires/update_package_requires.cpp b/src/tools/update_package_requires/update_package_requires.cpp index ea944d59a2..55c048a340 100644 --- a/src/tools/update_package_requires/update_package_requires.cpp +++ b/src/tools/update_package_requires/update_package_requires.cpp @@ -118,7 +118,7 @@ main(int argc, const char* const* argv) for (BRepositoryCache::Iterator it = repositoryCache.GetIterator(); const BPackageInfo* info = it.Next();) { - const BObjectList& provides = info->ProvidesList(); + const BObjectList& provides = info->ProvidesList(); int32 count = provides.CountItems(); for (int32 i = 0; i < count; i++) { BPackageResolvable* resolvable = provides.ItemAt(i);