Skip to content

Commit

Permalink
chore: unsafe -> unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Nov 27, 2024
1 parent 0e142d8 commit c71152b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ contains_target: (targets, value: std::string) -> bool = {

hash_file: (p: fs::path) -> u64 = {
f: std::ifstream = (p, std::ios::binary | std::ios::ate);
size: size_t = unsafe_cast<size_t>(f.tellg());
size: size_t = unchecked_cast<size_t>(f.tellg());
f.seekg(0, std::ios::beg);
buffer: std::vector<char> = ();
buffer.resize(size);
Expand Down Expand Up @@ -901,7 +901,7 @@ do_build: (targets: std::vector<std::string>) -> (stuff: full_build_info, exit_c
p := entry.first.generic_string();
hash := entry.second;

hash_data_file << unsafe_cast<u16>(p.size());
hash_data_file << unchecked_cast<u16>(p.size());
hash_data_file.write(p.data(), p.size());
hash_data_file.write(reinterpret_cast<*char>(hash&), 8);
}
Expand Down

0 comments on commit c71152b

Please sign in to comment.