From 039d5a096cd6259d15a870e7c7bab11cfc633589 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 07:41:48 +0000 Subject: [PATCH] [pre-commit.ci lite] apply automatic fixes --- source/driver.cpp | 18 +++++++----------- source/driver.h | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/source/driver.cpp b/source/driver.cpp index 81b3bf354c..dc7b550bef 100644 --- a/source/driver.cpp +++ b/source/driver.cpp @@ -25,7 +25,7 @@ void Driver::init() { ModuleBase::TITLE("Driver", "init"); - time_t time_start = std::time(NULL); + time_t time_start = std::time(nullptr); ModuleBase::timer::start(); // (1) read the input parameters. @@ -37,19 +37,18 @@ void Driver::init() this->atomic_world(); // (3) output information - time_t time_finish = std::time(NULL); + time_t time_finish = std::time(nullptr); Print_Info::print_time(time_start, time_finish); // (4) close all of the running logs INPUT.close_log(); // (5) output the json file - //Json::create_Json(&GlobalC::ucell.symm,GlobalC::ucell.atoms,&INPUT); - Json::create_Json(&GlobalC::ucell,&INPUT); - return; + // Json::create_Json(&GlobalC::ucell.symm,GlobalC::ucell.atoms,&INPUT); + Json::create_Json(&GlobalC::ucell, &INPUT); } -void Driver::reading(void) +void Driver::reading() { ModuleBase::timer::tick("Driver", "reading"); @@ -83,10 +82,9 @@ void Driver::reading(void) // ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running,"READING CARDS"); ModuleBase::timer::tick("Driver", "reading"); - return; } -void Driver::atomic_world(void) +void Driver::atomic_world() { ModuleBase::TITLE("Driver", "atomic_world"); //-------------------------------------------------- @@ -100,7 +98,5 @@ void Driver::atomic_world(void) this->driver_run(); ModuleBase::timer::finish(GlobalV::ofs_running); -ModuleBase::Memory::print_all(GlobalV::ofs_running); - -return; + ModuleBase::Memory::print_all(GlobalV::ofs_running); } diff --git a/source/driver.h b/source/driver.h index bf61af0895..8e3c222529 100644 --- a/source/driver.h +++ b/source/driver.h @@ -19,7 +19,7 @@ class Driver * This function read the parameter in "INPUT", "STRU" etc, * and split the MPI world into different groups. */ - void reading(); + static void reading(); /** * @brief An interface function.