Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit 9959530

Browse files
committed
Fix errors 'size_t': is not a member of 'td' in project storage.vcxproj
1 parent 489dec8 commit 9959530

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

Diff for: rldp2/RldpConnection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void RldpConnection::receive_raw_obj(ton::ton_api::rldp2_messagePart &part) {
278278
return;
279279
}
280280

281-
auto r_total_size = td::narrow_cast_safe<td::size_t>(part.total_size_);
281+
auto r_total_size = td::narrow_cast_safe<std::size_t>(part.total_size_);
282282
if (r_total_size.is_error()) {
283283
return;
284284
}

Diff for: storage/LoadSpeed.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "td/utils/format.h"
2323

2424
namespace ton {
25-
void LoadSpeed::add(td::size_t size, td::Timestamp now) {
25+
void LoadSpeed::add(std::size_t size, td::Timestamp now) {
2626
total_size_ += size;
2727
events_.push(Event{size, now});
2828
update(now);

Diff for: storage/LoadSpeed.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
namespace ton {
2727
class LoadSpeed {
2828
public:
29-
void add(td::size_t size, td::Timestamp now);
29+
void add(std::size_t size, td::Timestamp now);
3030
double speed(td::Timestamp now = td::Timestamp::now()) const;
3131
friend td::StringBuilder &operator<<(td::StringBuilder &sb, const LoadSpeed &speed);
3232

3333
private:
3434
struct Event {
35-
td::size_t size;
35+
std::size_t size;
3636
td::Timestamp at;
3737
};
3838
mutable td::VectorQueue<Event> events_;
39-
mutable td::size_t total_size_{0};
39+
mutable std::size_t total_size_{0};
4040

4141
double duration() const;
4242
void update(td::Timestamp now) const;

Diff for: storage/MerkleTree.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void MerkleTree::init_finish() {
138138
CHECK(root_hash_);
139139
}
140140

141-
void MerkleTree::remove_chunk(td::size_t index) {
141+
void MerkleTree::remove_chunk(std::size_t index) {
142142
CHECK(index < n_);
143143
index += n_;
144144
while (proof_[index].not_null()) {
@@ -147,13 +147,13 @@ void MerkleTree::remove_chunk(td::size_t index) {
147147
}
148148
}
149149

150-
bool MerkleTree::has_chunk(td::size_t index) const {
150+
bool MerkleTree::has_chunk(std::size_t index) const {
151151
CHECK(index < n_);
152152
index += n_;
153153
return proof_[index].not_null();
154154
}
155155

156-
void MerkleTree::add_chunk(td::size_t index, td::Slice hash) {
156+
void MerkleTree::add_chunk(std::size_t index, td::Slice hash) {
157157
CHECK(hash.size() == 32);
158158
CHECK(index < n_);
159159
index += n_;

Diff for: storage/MerkleTree.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ class MerkleTree {
3939
MerkleTree(size_t chunks_count, td::Ref<vm::Cell> root_proof);
4040

4141
struct Chunk {
42-
td::size_t index{0};
42+
std::size_t index{0};
4343
td::Bits256 hash;
4444
};
4545

4646
explicit MerkleTree(td::Span<Chunk> chunks);
4747

4848
MerkleTree() = default;
4949
void init_begin(size_t chunks_count);
50-
void init_add_chunk(td::size_t index, td::Slice hash);
50+
void init_add_chunk(std::size_t index, td::Slice hash);
5151
void init_finish();
5252

5353
// merge external proof with an existing proof
@@ -70,20 +70,20 @@ class MerkleTree {
7070

7171
private:
7272
td::uint64 total_blocks_;
73-
td::size_t n_; // n = 2^log_n
73+
std::size_t n_; // n = 2^log_n
7474
td::uint32 log_n_;
75-
td::size_t mark_id_{0};
76-
std::vector<td::size_t> mark_; // n_ * 2
75+
std::size_t mark_id_{0};
76+
std::vector<std::size_t> mark_; // n_ * 2
7777
std::vector<td::Ref<vm::Cell>> proof_; // n_ * 2
7878

7979
td::optional<td::Bits256> root_hash_;
8080
td::Ref<vm::Cell> root_proof_;
8181

8282
td::Status validate_proof(td::Ref<vm::Cell> new_root);
83-
bool has_chunk(td::size_t index) const;
84-
void remove_chunk(td::size_t index);
83+
bool has_chunk(std::size_t index) const;
84+
void remove_chunk(std::size_t index);
8585

86-
void add_chunk(td::size_t index, td::Slice hash);
86+
void add_chunk(std::size_t index, td::Slice hash);
8787
void init_proof();
8888

8989
td::Ref<vm::Cell> merge(td::Ref<vm::Cell> root, size_t index);

Diff for: storage/storage-cli.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ class StorageCli : public td::actor::Actor {
749749
auto file_id_str = parser.read_word();
750750
size_t file_id = std::numeric_limits<size_t>::max();
751751
if (file_id_str != "*") {
752-
TRY_RESULT_PROMISE_ASSIGN(promise, file_id, td::to_integer_safe<td::size_t>(file_id_str));
752+
TRY_RESULT_PROMISE_ASSIGN(promise, file_id, td::to_integer_safe<std::size_t>(file_id_str));
753753
}
754754
TRY_RESULT_PROMISE(promise, priority, td::to_integer_safe<td::uint8>(parser.read_word()));
755755
if (priority == 255) {

0 commit comments

Comments
 (0)