BSolverRepository: Change priority from uint8 to int32
This allows us to specifies priorities below and above the user definable range.
This commit is contained in:
@@ -51,8 +51,9 @@ public:
|
||||
|
||||
BString Name() const;
|
||||
|
||||
uint8 Priority() const;
|
||||
void SetPriority(uint8 priority);
|
||||
int32 Priority() const;
|
||||
void SetPriority(int32 priority);
|
||||
// negative priority is fine
|
||||
|
||||
bool IsEmpty() const;
|
||||
int32 CountPackages() const;
|
||||
@@ -70,7 +71,7 @@ private:
|
||||
|
||||
private:
|
||||
BString fName;
|
||||
uint8 fPriority;
|
||||
int32 fPriority;
|
||||
bool fIsInstalled;
|
||||
PackageList fPackages;
|
||||
uint64 fChangeCount;
|
||||
|
||||
@@ -588,7 +588,7 @@ LibsolvSolver::_AddRepositories()
|
||||
Repo* repo = repo_create(fPool, repository->Name());
|
||||
repositoryInfo->SetSolvRepo(repo);
|
||||
|
||||
repo->priority = 256 - repository->Priority();
|
||||
repo->priority = -1 - repository->Priority();
|
||||
repo->appdata = (void*)repositoryInfo;
|
||||
|
||||
int32 packageCount = repository->CountPackages();
|
||||
|
||||
@@ -209,7 +209,7 @@ BSolverRepository::Name() const
|
||||
}
|
||||
|
||||
|
||||
uint8
|
||||
int32
|
||||
BSolverRepository::Priority() const
|
||||
{
|
||||
return fPriority;
|
||||
@@ -217,7 +217,7 @@ BSolverRepository::Priority() const
|
||||
|
||||
|
||||
void
|
||||
BSolverRepository::SetPriority(uint8 priority)
|
||||
BSolverRepository::SetPriority(int32 priority)
|
||||
{
|
||||
fPriority = priority;
|
||||
fChangeCount++;
|
||||
|
||||
Reference in New Issue
Block a user