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;
|
BString Name() const;
|
||||||
|
|
||||||
uint8 Priority() const;
|
int32 Priority() const;
|
||||||
void SetPriority(uint8 priority);
|
void SetPriority(int32 priority);
|
||||||
|
// negative priority is fine
|
||||||
|
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
int32 CountPackages() const;
|
int32 CountPackages() const;
|
||||||
@@ -70,7 +71,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
BString fName;
|
BString fName;
|
||||||
uint8 fPriority;
|
int32 fPriority;
|
||||||
bool fIsInstalled;
|
bool fIsInstalled;
|
||||||
PackageList fPackages;
|
PackageList fPackages;
|
||||||
uint64 fChangeCount;
|
uint64 fChangeCount;
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ LibsolvSolver::_AddRepositories()
|
|||||||
Repo* repo = repo_create(fPool, repository->Name());
|
Repo* repo = repo_create(fPool, repository->Name());
|
||||||
repositoryInfo->SetSolvRepo(repo);
|
repositoryInfo->SetSolvRepo(repo);
|
||||||
|
|
||||||
repo->priority = 256 - repository->Priority();
|
repo->priority = -1 - repository->Priority();
|
||||||
repo->appdata = (void*)repositoryInfo;
|
repo->appdata = (void*)repositoryInfo;
|
||||||
|
|
||||||
int32 packageCount = repository->CountPackages();
|
int32 packageCount = repository->CountPackages();
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ BSolverRepository::Name() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint8
|
int32
|
||||||
BSolverRepository::Priority() const
|
BSolverRepository::Priority() const
|
||||||
{
|
{
|
||||||
return fPriority;
|
return fPriority;
|
||||||
@@ -217,7 +217,7 @@ BSolverRepository::Priority() const
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSolverRepository::SetPriority(uint8 priority)
|
BSolverRepository::SetPriority(int32 priority)
|
||||||
{
|
{
|
||||||
fPriority = priority;
|
fPriority = priority;
|
||||||
fChangeCount++;
|
fChangeCount++;
|
||||||
|
|||||||
Reference in New Issue
Block a user