summaryrefslogtreecommitdiff
path: root/src/apk_solver_data.h
diff options
context:
space:
mode:
authorroot <root@petrie.tu.ok.cox.net>2013-06-11 10:30:31 -0500
committerroot <root@petrie.tu.ok.cox.net>2013-06-11 10:30:31 -0500
commita2d873a77c6dd2e7f6219e6941af796e1f904e69 (patch)
tree85002b7ca26bbb4d80da1c3d0ef9ef99183d0ffb /src/apk_solver_data.h
parent129821d274a0569c3a078679c07f9c63aeff249f (diff)
downloadapk-tools-a2d873a77c6dd2e7f6219e6941af796e1f904e69.tar.gz
apk-tools-a2d873a77c6dd2e7f6219e6941af796e1f904e69.tar.bz2
apk-tools-a2d873a77c6dd2e7f6219e6941af796e1f904e69.tar.xz
apk-tools-a2d873a77c6dd2e7f6219e6941af796e1f904e69.zip
Revert "solver: increase score fields to 32-bits (from 16-bits)"
This reverts commit 84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9.
Diffstat (limited to 'src/apk_solver_data.h')
-rw-r--r--src/apk_solver_data.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/apk_solver_data.h b/src/apk_solver_data.h
index 8076a08..5777325 100644
--- a/src/apk_solver_data.h
+++ b/src/apk_solver_data.h
@@ -17,10 +17,24 @@
#include "apk_provider_data.h"
struct apk_score {
- uint32_t unsatisfied;
- uint32_t non_preferred_actions;
- uint32_t non_preferred_pinnings;
- uint32_t preference;
+ union {
+ struct {
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ unsigned short preference;
+ unsigned short non_preferred_pinnings;
+ unsigned short non_preferred_actions;
+ unsigned short unsatisfied;
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ unsigned short unsatisfied;
+ unsigned short non_preferred_actions;
+ unsigned short non_preferred_pinnings;
+ unsigned short preference;
+#else
+#error Unknown endianess.
+#endif
+ };
+ uint64_t score;
+ };
};
struct apk_solver_name_state {