Add <cassert> header include

This fixes some Linux build failures.
This commit is contained in:
2021-12-09 13:53:52 +00:00
parent 290126fd00
commit 3578b298aa
28 changed files with 52 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ auto md5(MD5Digest& digest, std::string const& s) -> unsigned int
EVP_MD_CTX* md_context{EVP_MD_CTX_new()};
assert(md_context != nullptr);
EVP_DigestInit_ex2(md_context, md, nullptr);
EVP_DigestInit_ex(md_context, md, nullptr);
EVP_DigestUpdate(md_context, s.data(), s.length());
EVP_DigestFinal_ex(md_context, digest.data(), &md_len);
return md_len;
@@ -40,4 +40,4 @@ auto main() -> int
}
return 0;
}
}

View File

@@ -15,7 +15,7 @@ auto md5(MD5Digest& digest, std::string const& s) -> unsigned int
EVP_MD_CTX* md_context{EVP_MD_CTX_new()};
assert(md_context != nullptr);
EVP_DigestInit_ex2(md_context, md, nullptr);
EVP_DigestInit_ex(md_context, md, nullptr);
EVP_DigestUpdate(md_context, s.data(), s.length());
EVP_DigestFinal_ex(md_context, digest.data(), &md_len);
return md_len;
@@ -40,4 +40,4 @@ auto main() -> int
}
return 0;
}
}

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <limits>
@@ -233,4 +234,4 @@ int main()
std::cout << "Best cost " << best_cost << "\n";
return 1;
}
}

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <limits>
@@ -231,4 +232,4 @@ int main()
std::cout << "Best cost " << best_cost << "\n";
return 1;
}
}

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <limits>
@@ -135,4 +136,4 @@ int main()
state.execute(instructions[state.pc_]);
}
std::cout << "a = " << state.a_ << "\nb = " << state.b_ << '\n';
}
}

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <limits>
@@ -135,4 +136,4 @@ int main()
state.execute(instructions[state.pc_]);
}
std::cout << "a = " << state.a_ << "\nb = " << state.b_ << '\n';
}
}

View File

@@ -1,3 +1,4 @@
#include <cassert>
#include <cstdint>
#include <iostream>
#include <string>
@@ -44,4 +45,4 @@ int main()
std::cout << "Target row " << target_row << " column " << target_column << '\n';
std::cout << "Row " << row << " column " << column << " num " << num << '\n';
return 0;
}
}