From c83f348adce3a18a9144ecfd73f4629cf060cc2a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 12 Apr 2022 22:34:04 +0200 Subject: Add and use new File class. It was always a bit troubling that fopen_boost wasn't exception safe, and this also fixes a leak where load_ratings_list would never close the ratings file. --- src/util.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 89278f92..451957d8 100644 --- a/src/util.h +++ b/src/util.h @@ -115,16 +115,6 @@ extern int base64_decode (std::string const & in, unsigned char* out, int out_le extern boost::optional relative_to_root (boost::filesystem::path root, boost::filesystem::path file); -/** @param p Path to open - * @param t mode flags, as for fopen(3) - * @return FILE pointer or 0 on error - * - * Apparently there is no way to create an ofstream using a UTF-8 - * filename under Windows. We are hence reduced to using fopen - * with this wrapper. - */ -extern FILE * fopen_boost (boost::filesystem::path, std::string); - extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 1048576); /** @param key RSA private key in PEM format (optionally with -----BEGIN... / -----END...) -- cgit v1.2.3