Skip to content

Commit

Permalink
fix build on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed Feb 20, 2025
1 parent f96e1b4 commit dd9214b
Show file tree
Hide file tree
Showing 27 changed files with 188 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Paladin/BuildOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ class CompileOptions



#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<BString, true> fLocalIncludeList,
#else
BObjectList<BString> fLocalIncludeList,
#endif
fSystemIncludeList;

bool fDebug;
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/BuildInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "BuildInfo.h"

BuildInfo::BuildInfo(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: includeList(20)
#else
: includeList(20,true)
#endif
{
}
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/BuildInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ class BuildInfo
DPath projectFolder;
DPath objectFolder;

#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<ProjectPath, true> includeList;
#else
BObjectList<ProjectPath> includeList;
#endif
BString includeString;

ErrorList errorList;
Expand Down
8 changes: 8 additions & 0 deletions Paladin/BuildSystem/ErrorParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,22 @@ error_msg::PrintToStream(void)


ErrorList::ErrorList(const char *string)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: msglist(20),
#else
: msglist(20,true),
#endif
fIndex(0)
{
}


ErrorList::ErrorList(const ErrorList &from)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: msglist(20),
#else
: msglist(20,true),
#endif
fIndex(0)
{
*this = from;
Expand Down
5 changes: 4 additions & 1 deletion Paladin/BuildSystem/ErrorParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ class ErrorList : public BLocker

BString AsString(void);

#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<error_msg, true> msglist;
#else
BObjectList<error_msg> msglist;

#endif
private:
int32 fIndex;
};
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/FileFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
FileFactory gFileFactory;

FileFactory::FileFactory(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: fList(20)
#else
: fList(20,true)
#endif
{
LoadTypes();
}
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/FileFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ class FileFactory

private:
SourceType * FindTypeForExtension(const char *ext);
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<SourceType, true> fList;
#else
BObjectList<SourceType> fList;
#endif
};

extern FileFactory gFileFactory;
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/SourceFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ SourceFile::GetStat(const char *path, struct stat *s, bool use_cache) const

SourceGroup::SourceGroup(const char *name_)
: name(name_ ? name_ : "Source Files"),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
filelist(20),
#else
filelist(20,true),
#endif
expanded(true)
{
}
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/SourceFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ class SourceGroup
void PrintToStream(void);

BString name;
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<SourceFile, true> filelist;
#else
BObjectList<SourceFile> filelist;
#endif
bool expanded;
};

Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/StatCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
#include <stdio.h>

StatCache::StatCache(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: fList(20),
#else
: fList(20,true),
#endif
fMaxItems(79)
{
// 79 is the approximate number of stat structures that will fit into 4K, which
Expand Down
4 changes: 4 additions & 0 deletions Paladin/BuildSystem/StatCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ class StatCache
void MakeEmpty(void);

private:
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<statdata, true> fList;
#else
BObjectList<statdata> fList;
#endif
int32 fMaxItems;
};

Expand Down
14 changes: 14 additions & 0 deletions Paladin/CodeLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,26 @@ GetCodeLibraryPath(void)
CodeModule::CodeModule(void)
: fStatus(B_NO_INIT),
fName("Untitled"),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fFiles(20),
fLibraries(20)
#else
fFiles(20,true),
fLibraries(20,true)
#endif
{
}


CodeModule::CodeModule(const char *name)
: fStatus(B_NO_INIT),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fFiles(20),
fLibraries(20)
#else
fFiles(20,true),
fLibraries(20,true)
#endif
{
Load(name);
}
Expand Down Expand Up @@ -607,7 +617,11 @@ CodeModule::LoadFile(entry_ref &fileref)


CodeLib::CodeLib(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: fModules(20)
#else
: fModules(20,true)
#endif
{
}

Expand Down
9 changes: 9 additions & 0 deletions Paladin/CodeLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ class CodeModule

status_t fStatus;
BString fName;
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<ModFile, true> fFiles;
BObjectList<BString, true> fLibraries;
#else
BObjectList<ModFile> fFiles;
BObjectList<BString> fLibraries;
#endif
BString fDescription;
};

Expand Down Expand Up @@ -92,7 +97,11 @@ class CodeLib

void PrintToStream(void);
private:
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<CodeModule, true> fModules;
#else
BObjectList<CodeModule> fModules;
#endif
};

void SyncProjectModules(CodeLib &lib, Project *proj);
Expand Down
12 changes: 12 additions & 0 deletions Paladin/FindWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ class GrepListItem : public RefListItem
};

void
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
TokenizeToList(const char *string, BObjectList<BString, true> &stringList)
#else
TokenizeToList(const char *string, BObjectList<BString> &stringList)
#endif
{
if (!string)
return;
Expand Down Expand Up @@ -109,7 +113,11 @@ FindWindow::FindWindow(BString workingDir)
fThreadID(-1),
fThreadMode(0),
fThreadQuitFlag(0),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fFileList(20),
#else
fFileList(20, true),
#endif
fWorkingDir(""),
fProject(NULL)
{
Expand Down Expand Up @@ -435,7 +443,11 @@ FindWindow::FindResults(void)
if (fThreadQuitFlag)
return;

#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<BString, true> resultList(20);
#else
BObjectList<BString> resultList(20, true);
#endif
TokenizeToList(out.String(), resultList);

Lock();
Expand Down
4 changes: 4 additions & 0 deletions Paladin/FindWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ class FindWindow : public DWindow
int8 fThreadMode;
int32 fThreadQuitFlag;

#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<BString, true> fFileList;
#else
BObjectList<BString> fFileList;
#endif
BString fWorkingDir;
Project *fProject;
};
Expand Down
4 changes: 4 additions & 0 deletions Paladin/LicenseManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ LicenseManager::LicenseManager(const char* targetPath)
BWindow(BRect(0.0f, 0.0f, 640.0f, 480.0f), B_TRANSLATE("Add license to project"),
B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS),
fTargetPath(targetPath),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fPathList(20)
#else
fPathList(20, true)
#endif
{
AddCommonFilter(new EscapeCancelFilter());

Expand Down
4 changes: 4 additions & 0 deletions Paladin/LicenseManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ class LicenseManager : public BWindow {
BListView* fLicenseList;
BTextView* fLicenseShort;
BTextView* fLicenseLong;
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<BString, true> fPathList;
#else
BObjectList<BString> fPathList;
#endif
};


Expand Down
2 changes: 1 addition & 1 deletion Paladin/Paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ App::App(void)
InitGlobals();
EnsureTemplates();

gProjectList = new LockableList<Project>(20,true);
gProjectList = new LockableList<Project>(20);
gProjectWindowPoint.Set(5,24);

fOpenPanel = NULL;
Expand Down
9 changes: 9 additions & 0 deletions Paladin/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,21 @@ Project::Project(const char *name, const char *targetname)
BLocker(name),
fName(name),
fTargetName(targetname),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fDirtyFiles(20),
fLibraryList(20),
fLocalIncludeList(20),
fSystemIncludeList(20),
fAccessList(20),
fGroupList(20),
#else
fDirtyFiles(20,false),
fLibraryList(20,true),
fLocalIncludeList(20,true),
fSystemIncludeList(20,true),
fAccessList(20,true),
fGroupList(20,true),
#endif
fReadOnly(false),
fDebug(false),
fProfile(false),
Expand Down
11 changes: 11 additions & 0 deletions Paladin/Project.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ class Project : public BLocker
DPath fPath,
fObjectPath;

#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<SourceFile, false> fDirtyFiles;
BObjectList<SourceFile, true> fLibraryList;

BObjectList<ProjectPath, true> fLocalIncludeList;
BObjectList<BString, true> fSystemIncludeList,
fAccessList;

BObjectList<SourceGroup, true> fGroupList;
#else
BObjectList<SourceFile> fDirtyFiles;
BObjectList<SourceFile> fLibraryList;

Expand All @@ -211,6 +221,7 @@ class Project : public BLocker
fAccessList;

BObjectList<SourceGroup> fGroupList;
#endif
ErrorList *fErrorList;

BuildInfo fBuildInfo;
Expand Down
4 changes: 4 additions & 0 deletions Paladin/SourceControl/SCMImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#include "Globals.h"

SCMProjectImporterManager::SCMProjectImporterManager(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: fImporterList(20)
#else
: fImporterList(20,true)
#endif
{
fImporterList.AddItem(new SourceforgeImporter());
fImporterList.AddItem(new BitbucketImporter());
Expand Down
4 changes: 4 additions & 0 deletions Paladin/SourceControl/SCMImporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class SCMProjectImporterManager
SCMProjectImporter * FindImporter(const char *name);

private:
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
BObjectList<SCMProjectImporter, true> fImporterList;
#else
BObjectList<SCMProjectImporter> fImporterList;
#endif
};


Expand Down
12 changes: 12 additions & 0 deletions Paladin/TemplateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include "TextFile.h"

TemplateManager::TemplateManager(void)
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
: fList(20)
#else
: fList(20,true)
#endif
{
}

Expand Down Expand Up @@ -79,9 +83,17 @@ TemplateManager::CountTemplates(void) const

ProjectTemplate::ProjectTemplate(entry_ref ref)
: fStatus(B_NO_INIT),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fRefList(20),
#else
fRefList(20,true),
#endif
fTargetType(-1),
#if B_HAIKU_VERSION > B_HAIKU_VERSION_1_BETA_5
fLibList(20)
#else
fLibList(20,true)
#endif
{
Load(ref);
}
Expand Down
Loading

0 comments on commit dd9214b

Please sign in to comment.