Skip to content

Commit

Permalink
Pass heap-allocated arguments to member function AddItem
Browse files Browse the repository at this point in the history
Reverts previous changes that allowed gcc5 linker to succeed.
Fixes HaikuArchives#95

Also, make AutoFiler pass gcc5 linker.
Fixes HaikuArchives#97
  • Loading branch information
owenca committed Aug 2, 2017
1 parent 514d5dd commit 0cda19e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions sources/FSUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ status_t MoveFile(BEntry* srcentry, BEntry* destentry, bool clobber)
}


#if 0
const char* GetValidName(BEntry* entry)
{
// given a particular location, this will (1) check to see if said entry
Expand Down Expand Up @@ -207,6 +208,7 @@ const char* GetValidName(BEntry* entry)

return path.Path();
}
#endif


bool IsFilenameChar(char c)
Expand Down
2 changes: 1 addition & 1 deletion sources/Makefile_AutoFiler
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RSRCS =
# - if your library does not follow the standard library naming scheme,
# you need to specify the path to the library and it's name.
# (e.g. for mylib.a, specify "mylib.a" or "path/mylib.a")
LIBS = be
LIBS = be $(STDCPPLIBS)

# Specify additional paths to directories following the standard libXXX.so
# or libXXX.a naming scheme. You can specify full paths or paths relative
Expand Down
13 changes: 5 additions & 8 deletions sources/RefStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@ LoadFolders(BListView* folderList)
if (entry.GetRef(&ref) != B_OK)
continue;

RefStorage refholder(ref);
gRefStructList.AddItem(&refholder);
count++;
} else {
BStringItem item(str);
folderList->AddItem(&item);
count++;
}
gRefStructList.AddItem(new RefStorage(ref));
} else
folderList->AddItem(new BStringItem(str));

count++;
}

if (count < i)
Expand Down

0 comments on commit 0cda19e

Please sign in to comment.