Add BSolverPackageSpecifierList::AppendSpecifiers()
This commit is contained in:
parent
94dc74b027
commit
9b2fd34196
@ -31,6 +31,9 @@ public:
|
||||
const BSolverPackageSpecifier& specifier);
|
||||
bool AppendSpecifier(BSolverPackage* package);
|
||||
bool AppendSpecifier(const BString& selectString);
|
||||
bool AppendSpecifiers(
|
||||
const char* const* selectStrings,
|
||||
int32 count);
|
||||
void MakeEmpty();
|
||||
|
||||
BSolverPackageSpecifierList& operator=(
|
||||
|
@ -40,7 +40,7 @@ BSolverPackageSpecifierList::BSolverPackageSpecifierList()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
BSolverPackageSpecifierList::BSolverPackageSpecifierList(
|
||||
const BSolverPackageSpecifierList& other)
|
||||
:
|
||||
@ -115,6 +115,22 @@ BSolverPackageSpecifierList::AppendSpecifier(const BString& selectString)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BSolverPackageSpecifierList::AppendSpecifiers(const char* const* selectStrings,
|
||||
int32 count)
|
||||
{
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
if (!AppendSpecifier(selectStrings[i])) {
|
||||
for (int32 k = i - 1; k >= 0; k--)
|
||||
fSpecifiers->pop_back();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BSolverPackageSpecifierList::MakeEmpty()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user