Skip to content

Commit

Permalink
Merge pull request #34 from BenLangmead/fix-uint
Browse files Browse the repository at this point in the history
Change from uint -> unsigned int; uint isn't defined in clang++
  • Loading branch information
ishmeals authored Apr 12, 2024
2 parents d3fd760 + 081ce4c commit 4843d9b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/digest/data_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ template <int k> struct SegmentTree {

template <uint32_t k> struct Naive {
std::array<uint64_t, k> arr;
uint i = 0;
unsigned int i = 0;

Naive(uint32_t){};
Naive(const Naive &other) = default;
Expand Down Expand Up @@ -104,8 +104,8 @@ template <uint32_t k> struct Naive {
}

void min_syncmer(std::vector<uint32_t> &vec) {
uint j = 0;
for (uint l = 1; l < k; l++) {
unsigned int j = 0;
for (unsigned int l = 1; l < k; l++) {
if (arr[l] > arr[j]) {
j = l;
}
Expand All @@ -117,7 +117,7 @@ template <uint32_t k> struct Naive {
}

void min_syncmer(std::vector<std::pair<uint32_t, uint32_t>> &vec) {
uint j = k - 1;
unsigned int j = k - 1;
for (int l = k - 2; l >= 0; l--) {
if (arr[l] > arr[j]) {
j = l;
Expand All @@ -131,8 +131,8 @@ template <uint32_t k> struct Naive {
};

template <uint32_t k> struct Naive2 {
uint i = 0;
uint last = 0;
unsigned int i = 0;
unsigned int last = 0;
std::vector<uint64_t> arr = std::vector<uint64_t>(k);

Naive2(uint32_t){};
Expand Down Expand Up @@ -246,7 +246,7 @@ struct Adaptive {

void min_syncmer(std::vector<uint32_t> &vec) {
if (k < 16) {
uint j = k - 1;
unsigned int j = k - 1;
for (int l = k - 2; l >= 0; l--) {
if (arr[l] > arr[j]) {
j = l;
Expand All @@ -266,7 +266,7 @@ struct Adaptive {

void min_syncmer(std::vector<std::pair<uint32_t, uint32_t>> &vec) {
if (k < 16) {
uint j = k - 1;
unsigned int j = k - 1;
for (int l = k - 2; l >= 0; l--) {
if (arr[l] > arr[j]) {
j = l;
Expand Down Expand Up @@ -355,7 +355,7 @@ struct Adaptive64 {

void min_syncmer(std::vector<uint32_t> &vec) {
if (k < 16) {
uint j = k - 1;
unsigned int j = k - 1;
for (int l = k - 2; l >= 0; l--) {
if (arr[l] > arr[j]) {
j = l;
Expand All @@ -375,7 +375,7 @@ struct Adaptive64 {

void min_syncmer(std::vector<std::pair<uint32_t, uint64_t>> &vec) {
if (k < 16) {
uint j = k - 1;
unsigned int j = k - 1;
for (int l = k - 2; l >= 0; l--) {
if (arr[l] > arr[j]) {
j = l;
Expand Down

0 comments on commit 4843d9b

Please sign in to comment.