aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_xline_db.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-02-06 01:25:25 +0000
committerGravatar Sadie Powell2020-02-06 01:53:16 +0000
commit8d9b0e75700d35a00066c6dad8670fa8e5a438a3 (patch)
tree98696b3d05a5bc2d56f17b606d1f32116c1adace /src/modules/m_xline_db.cpp
parentMake WritePID read directly from the config. (diff)
In C++11 [io]fstream has std::string constructors; use them.
Diffstat (limited to 'src/modules/m_xline_db.cpp')
-rw-r--r--src/modules/m_xline_db.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index fdce63c73..70e782c10 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -104,7 +104,7 @@ class ModuleXLineDB
*/
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Opening temporary database");
std::string xlinenewdbpath = xlinedbpath + ".new";
- std::ofstream stream(xlinenewdbpath.c_str());
+ std::ofstream stream(xlinenewdbpath);
if (!stream.is_open())
{
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
@@ -173,7 +173,7 @@ class ModuleXLineDB
if (!FileSystem::FileExists(xlinedbpath))
return true;
- std::ifstream stream(xlinedbpath.c_str());
+ std::ifstream stream(xlinedbpath);
if (!stream.is_open())
{
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno);