Skip to content

Commit 28b59e7

Browse files
fix build on ubuntu
1 parent 602cdcd commit 28b59e7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

contracts/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ add_subdirectory(proxy)
2727
add_subdirectory(test_api)
2828
add_subdirectory(test_api_mem)
2929
add_subdirectory(test_api_db)
30-
if(APPLE)
3130
add_subdirectory(test_api_multi_index)
32-
endif()
3331
add_subdirectory(test_ram_limit)
3432
#add_subdirectory(social)
3533
add_subdirectory(eosio.bios)

contracts/test_api_multi_index/test_multi_index.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ void test_multi_index::idx256_general(uint64_t receiver, uint64_t code, uint64_t
565565
indexed_by< N(bysecondary), const_mem_fun<record, const key256&, &record::get_secondary> >
566566
> table( receiver, receiver );
567567

568-
auto fourtytwo = key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 42ULL);
568+
// auto fourtytwo = key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 42ULL);
569+
auto fourtytwo = key256{std::array<uint32_t, 8>{{0,0, 0,0, 0,0, 0,42}}};
569570
//auto onetwothreefour = key256::make_from_word_sequence<uint64_t>(1ULL, 2ULL, 3ULL, 4ULL);
570571
auto onetwothreefour = key256{std::array<uint32_t, 8>{{0,1, 0,2, 0,3, 0,4}}};
571572

@@ -604,11 +605,13 @@ void test_multi_index::idx256_general(uint64_t receiver, uint64_t code, uint64_t
604605

605606
auto secidx = table.get_index<N(bysecondary)>();
606607

607-
auto lower1 = secidx.lower_bound(key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 40ULL));
608+
// auto lower1 = secidx.lower_bound(key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 40ULL));
609+
auto lower1 = secidx.lower_bound(key256{std::array<uint32_t, 8>{{0,0, 0,0, 0,0, 0,40}}});
608610
print("First entry with a secondary key of at least 40 has ID=", lower1->id, ".\n");
609611
eosio_assert( lower1->id == 1, "idx256_general - lower_bound" );
610612

611-
auto lower2 = secidx.lower_bound(key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 50ULL));
613+
// auto lower2 = secidx.lower_bound(key256::make_from_word_sequence<uint64_t>(0ULL, 0ULL, 0ULL, 50ULL));
614+
auto lower2 = secidx.lower_bound(key256{std::array<uint32_t, 8>{{0,0, 0,0, 0,0, 0,50}}});
612615
print("First entry with a secondary key of at least 50 has ID=", lower2->id, ".\n");
613616
eosio_assert( lower2->id == 2, "idx256_general - lower_bound" );
614617

0 commit comments

Comments
 (0)