Skip to content

Commit 7214328

Browse files
authored
Merge pull request #30 from markround/bobjectlist
Fixed up BObjectList compilation failures
2 parents 47fbf24 + 2603fe0 commit 7214328

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

source/FSUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ status_t FSDeleteFolder(BEntry *, CopyLoopControl *, bool updateStatus,
155155
status_t FSCopyAttributesAndStats(BNode *, BNode *);
156156

157157
void FSDuplicate(BObjectList<entry_ref> *srcList, BList *pointList);
158-
void FSMoveToFolder(BObjectList<entry_ref> *srcList, BEntry *, uint32 moveMode,
158+
void FSMoveToFolder(BObjectList<entry_ref, true> *srcList, BEntry *, uint32 moveMode,
159159
BList *pointList = NULL);
160160
void FSMakeOriginalName(char *name, BDirectory *destDir, const char *suffix);
161161
bool FSIsTrashDir(const BEntry *);
@@ -164,7 +164,7 @@ bool FSIsDeskDir(const BEntry *);
164164
bool FSIsSystemDir(const BEntry *);
165165
bool FSIsBeOSDir(const BEntry *);
166166
bool FSIsHomeDir(const BEntry *);
167-
void FSMoveToTrash(BObjectList<entry_ref> *srcList, BList *pointList = NULL,
167+
void FSMoveToTrash(BObjectList<entry_ref, true> *srcList, BList *pointList = NULL,
168168
bool asynch = true);
169169
// Deprecated
170170
// only returns actual result if asynch false

source/InnerPanelIcons.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ status_t TTrackerIcon::DroppedSomething( const BMessage *message )
530530
BEntry entry( &fRef, true );
531531
if ( entry.IsDirectory() )
532532
{
533-
BObjectList<entry_ref> *list = new BObjectList<entry_ref>();
533+
BObjectList<entry_ref, true> *list = new BObjectList<entry_ref, true>();
534534
entry_ref ref;
535535
int i;
536536
for ( i=0; ; i++ )
@@ -1506,7 +1506,7 @@ status_t TTrashIcon::DroppedSomething( const BMessage *message )
15061506
{
15071507
if ( message->what == B_SIMPLE_DATA )
15081508
{
1509-
BObjectList<entry_ref> *list = new BObjectList<entry_ref>();
1509+
BObjectList<entry_ref, true> *list = new BObjectList<entry_ref, true>();
15101510
entry_ref ref;
15111511
int i;
15121512
for ( i=0; ; i++ )

source/LockingList2.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
namespace BPrivate {
1010

11-
template <class T>
12-
class LockingList2 : public BObjectList<T> {
11+
template <class T, bool Owning = false>
12+
class LockingList2 : public BObjectList<T, Owning> {
1313
public:
14-
LockingList2(int32 itemsPerBlock = 20, bool owning = false);
14+
LockingList2(int32 itemsPerBlock = 20);
1515
~LockingList2()
1616
{
1717
Lock();
@@ -24,29 +24,29 @@ class LockingList2 : public BObjectList<T> {
2424
BLocker lock;
2525
};
2626

27-
template<class T>
28-
LockingList2<T>::LockingList2(int32 itemsPerBlock, bool owning)
29-
: BObjectList<T>(itemsPerBlock, owning)
27+
template<class T, bool O>
28+
LockingList2<T, O>::LockingList2(int32 itemsPerBlock)
29+
: BObjectList<T, O>(itemsPerBlock)
3030
{
3131
}
3232

33-
template<class T>
33+
template<class T, bool O>
3434
bool
35-
LockingList2<T>::Lock()
35+
LockingList2<T, O>::Lock()
3636
{
3737
return lock.Lock();
3838
}
3939

40-
template<class T>
40+
template<class T, bool O>
4141
void
42-
LockingList2<T>::Unlock()
42+
LockingList2<T, O>::Unlock()
4343
{
4444
lock.Unlock();
4545
}
4646

47-
template<class T>
47+
template<class T, bool O>
4848
bool
49-
LockingList2<T>::IsLocked() const
49+
LockingList2<T, O>::IsLocked() const
5050
{
5151
return lock.IsLocked();
5252
}

source/NavMenu.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ All rights reserved.
4646
#include "SlowMenu.h"
4747

4848

49-
template<class T> class BObjectList;
49+
template<class T, bool O> class BObjectList;
5050
class BMenuItem;
5151

5252
namespace BPrivate {
@@ -75,9 +75,9 @@ class TrackingHookData {
7575
class BNavMenu : public BSlowMenu {
7676
public:
7777
BNavMenu(const char* title, uint32 message, const BHandler *,
78-
BWindow *parentWindow = NULL, const BObjectList<BString> *list = NULL);
78+
BWindow* parentWindow = NULL, const BStringList* list = NULL);
7979
BNavMenu(const char* title, uint32 message, const BMessenger &,
80-
BWindow *parentWindow = NULL, const BObjectList<BString> *list = NULL);
80+
BWindow* parentWindow = NULL, const BStringList* list = NULL);
8181
// parentWindow, if specified, will be closed if nav menu item invoked
8282
// with option held down
8383

@@ -95,8 +95,8 @@ class BNavMenu : public BSlowMenu {
9595
void SetTarget(const BMessenger &);
9696
BMessenger Target();
9797

98-
void SetTypesList(const BObjectList<BString> *list);
99-
const BObjectList<BString> *TypesList() const;
98+
void SetTypesList(const BStringList* list);
99+
const BStringList* TypesList() const;
100100

101101
void AddNavDir(const Model *model, uint32 what, BHandler *target,
102102
bool populateSubmenu);
@@ -110,10 +110,10 @@ class BNavMenu : public BSlowMenu {
110110
static int CompareFolderNamesFirstOne(const BMenuItem *, const BMenuItem *);
111111
static int CompareOne(const BMenuItem *, const BMenuItem *);
112112

113-
static ModelMenuItem *NewModelItem(Model *, const BMessage *, const BMessenger &,
114-
bool suppressFolderHierarchy=false, BContainerWindow * = NULL,
115-
const BObjectList<BString> *typeslist = NULL,
116-
TrackingHookData *hook = NULL);
113+
static ModelMenuItem* NewModelItem(Model*, const BMessage*,
114+
const BMessenger&, bool suppressFolderHierarchy = false,
115+
BContainerWindow* = NULL, const BStringList* typeslist = NULL,
116+
TrackingHookData* hook = NULL);
117117

118118
TrackingHookData *InitTrackingHook(bool (*hookfunction)(BMenu *, void *),
119119
const BMessenger *target, const BMessage *dragMessage);
@@ -137,11 +137,11 @@ class BNavMenu : public BSlowMenu {
137137

138138
// menu building state
139139
uint8 fFlags;
140-
BObjectList<BMenuItem> *fItemList;
140+
BObjectList<BMenuItem, false>* fItemList;
141141
EntryListBase *fContainer;
142142
bool fIteratingDesktop;
143143

144-
const BObjectList<BString> *fTypesList;
144+
BStringList* fTypesList;
145145

146146
TrackingHookData fTrackingHook;
147147
};
@@ -154,11 +154,11 @@ class BNavMenu : public BSlowMenu {
154154
bool SpringLoadedFolderCompareMessages(const BMessage *incoming,
155155
const BMessage *dragmessage);
156156
void SpringLoadedFolderSetMenuStates(const BMenu *menu,
157-
const BObjectList<BString> *typeslist);
157+
const BStringList *typeslist);
158158
void SpringLoadedFolderAddUniqueTypeToList(entry_ref *ref,
159-
BObjectList<BString> *typeslist);
159+
BStringList *typeslist);
160160
void SpringLoadedFolderCacheDragData(const BMessage *incoming,
161-
BMessage **, BObjectList<BString> **typeslist);
161+
BMessage **, BStringList **typeslist);
162162

163163
} // namespace BPrivate
164164

0 commit comments

Comments
 (0)