mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Merge pull request #746 from blackjack/master
Remove mode string from ifstream constructor in R.12
This commit is contained in:
@@ -8197,7 +8197,7 @@ The allocation of `buf` may fail and leak the file handle.
|
|||||||
|
|
||||||
void f(const string& name)
|
void f(const string& name)
|
||||||
{
|
{
|
||||||
ifstream f{name, "r"}; // open the file
|
ifstream f{name}; // open the file
|
||||||
vector<char> buf(1024);
|
vector<char> buf(1024);
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user