Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions Viewer/ecflowUI/src/CommandDesignerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
#include "CommandDesignerWidget.hpp"

#include <QMessageBox>
#include <boost/enable_shared_from_this.hpp>

#include "CustomCommandHandler.hpp"
#include "NodeExpression.hpp"
#include "NodeQueryResult.hpp"
#include "ecflow/core/Child.hpp"
#include "ecflow/core/Str.hpp"

using namespace boost;
namespace po = boost::program_options;

CommandDesignerWidget::CommandDesignerWidget(QWidget* parent) : QWidget(parent), menuItem_("") {
Expand Down Expand Up @@ -182,9 +180,9 @@ const std::vector<VInfo_ptr>& CommandDesignerWidget::selectedNodes() {

void CommandDesignerWidget::addClientCommandsToComponentList() {
// sort the commands into alphabetical order
std::vector<boost::shared_ptr<po::option_description>> options = clientOptionsDescriptions_->options();
auto options = clientOptionsDescriptions_->options();

using opt_desc = boost::shared_ptr<po::option_description>;
using opt_desc = decltype(options)::value_type;
std::sort(options.begin(), options.end(), [](const opt_desc& a, const opt_desc& b) {
return a->long_name() < b->long_name();
});
Expand Down
2 changes: 0 additions & 2 deletions Viewer/ecflowUI/src/GotoLineDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

#include "ui_GotoLineDialog.h"

using namespace std;

class GotoLineDialog : public QDialog, private Ui::GotoLineDialogQ {
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion Viewer/ecflowUI/src/LogLoadView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ void LogRequestView::writeSettings(VComboSettings* vs) {

void LogRequestView::readSettings(VComboSettings* vs) {
// sort mode
// QString resMode=QString::fromStdString(vs->get<std::string>("plotResolution", std::string()));
// QString resMode=QString::fromStdString(vs->get<std::string>("plotResolution", std::string{}));
// ViewerUtil::initComboBoxByData(resMode,ui_->resCombo);

splitterSavedState_ = vs->getQs("splitter").toByteArray();
Expand Down
1 change: 0 additions & 1 deletion Viewer/ecflowUI/src/ServerComInfoWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <QPainter>
#include <QTimer>
#include <QToolButton>
#include <boost/current_function.hpp>

#include "ConnectState.hpp"
#include "FontMetrics.hpp"
Expand Down
2 changes: 1 addition & 1 deletion Viewer/ecflowUI/src/UiLogS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class ServerHandler;

#define UI_FUNCTION_LOG_S(server) UiFunctionLogS __fclog(server, BOOST_CURRENT_FUNCTION);
#define UI_FUNCTION_LOG_S(server) UiFunctionLogS __fclog(server, __func__);

class UiFunctionLogS : public UiFunctionLog {
public:
Expand Down
4 changes: 2 additions & 2 deletions Viewer/ecflowUI/src/VConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ bool VConfig::readRcFile(const std::string& rcFile, boost::property_tree::ptree&
}
else if (par[0] == "suites") {
boost::property_tree::ptree suites;
suites.push_back(std::make_pair(std::string(""), boost::property_tree::ptree(par[1])));
suites.push_back(std::make_pair(std::string{}, boost::property_tree::ptree(par[1])));

for (unsigned int j = 1; j < vec.size(); j++) {
suites.push_back(std::make_pair(std::string(""), boost::property_tree::ptree(vec.at(j))));
suites.push_back(std::make_pair(std::string{}, boost::property_tree::ptree(vec.at(j))));
}

pt.put_child("suite_filter.suites", suites);
Expand Down
7 changes: 2 additions & 5 deletions Viewer/ecflowUI/src/VDir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "VDir.hpp"

#include <QtGlobal>
#include <boost/foreach.hpp>

#include "DirectoryHandler.hpp"
#include "ecflow/core/Filesystem.hpp"
Expand Down Expand Up @@ -68,10 +67,8 @@ void VDir::reload() {

fs::path path(path_);

fs::directory_iterator it(path), eod;

BOOST_FOREACH (fs::path const& p, std::make_pair(it, eod)) {
if (is_regular_file(p) && ecf::algorithm::starts_with(p.filename().string(), pattern_)) {
for (fs::path p : fs::directory_iterator(path)) {
if (fs::is_regular_file(p) && ecf::algorithm::starts_with(p.filename().string(), pattern_)) {
auto* item = new VDirItem;

item->name_ = p.filename().string();
Expand Down
2 changes: 1 addition & 1 deletion Viewer/ecflowUI/src/VNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ bool VNode::isAlias() const
#endif

std::string VNode::flagsAsStr() const {
return (node_) ? node_->get_flag().to_string() : std::string();
return (node_) ? node_->get_flag().to_string() : std::string{};
}

bool VNode::isFlagSet(ecf::Flag::Type f) const {
Expand Down
9 changes: 3 additions & 6 deletions Viewer/libViewer/src/DirectoryHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <regex>

#include <QFile>
#include <boost/foreach.hpp>

#include "UiLog.hpp"
#include "UserMessage.hpp"
Expand Down Expand Up @@ -226,11 +225,10 @@ void DirectoryHandler::findDirContents(const std::string& dirPath,
FileType type,
std::vector<std::string>& res) {
fs::path path(dirPath);
fs::directory_iterator it(path), eod;

const std::regex expr(filterStr);

BOOST_FOREACH (fs::path const& p, std::make_pair(it, eod)) {
for (fs::path p : fs::directory_iterator(path)) {
std::smatch what;
std::string fileName = p.filename().string();

Expand Down Expand Up @@ -316,8 +314,7 @@ bool DirectoryHandler::copyDir(const std::string& srcDir, const std::string& des

// go through all the files/dirs in the dir
bool ok = true;
fs::directory_iterator it(src), eod;
BOOST_FOREACH (fs::path const& p, std::make_pair(it, eod)) {
for (fs::path p : fs::directory_iterator(src)) {
if (is_regular_file(p)) // file? then copy it into its new home
{
// The original boost based copy implementation did not work with newer compilers,
Expand All @@ -340,7 +337,7 @@ bool DirectoryHandler::copyDir(const std::string& srcDir, const std::string& des
}
#endif
}
else if (is_directory(p)) // directory? then copy it recursively
else if (fs::is_directory(p)) // directory? then copy it recursively
{
fs::path destSubDir(destDir);
destSubDir /= p.filename();
Expand Down
7 changes: 3 additions & 4 deletions Viewer/libViewer/src/UiLog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <vector>

#include <QStringList>
#include <boost/current_function.hpp>

class QModelIndex;
class QVariant;
Expand Down Expand Up @@ -77,9 +76,9 @@ class UiLog {
UiLog& operator=(const UiLog&) = delete;
};

#define UI_FUNCTION_LOG UiFunctionLog __fclog(BOOST_CURRENT_FUNCTION);
#define UI_FN_DBG UiLog().dbg() << UiFunctionLog::formatFuncInfo(BOOST_CURRENT_FUNCTION);
#define UI_FN_INFO UiFunctionLog::formatFuncInfo(BOOST_CURRENT_FUNCTION)
#define UI_FUNCTION_LOG UiFunctionLog __fclog(__func__);
#define UI_FN_DBG UiLog().dbg() << UiFunctionLog::formatFuncInfo(__func__);
#define UI_FN_INFO UiFunctionLog::formatFuncInfo(__func__)

// Overload ostringstream for various objects
std::ostream& operator<<(std::ostream&, const std::vector<std::string>&);
Expand Down
1 change: 0 additions & 1 deletion libs/attribute/src/ecflow/attribute/DateAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "ecflow/core/Extract.hpp"
#include "ecflow/core/Serialization.hpp"

using namespace std;
using namespace ecf;

//==========================================================================================
Expand Down
1 change: 0 additions & 1 deletion libs/attribute/src/ecflow/attribute/DayAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "ecflow/core/Serialization.hpp"
#include "ecflow/core/cereal_boost_time.hpp"

using namespace std;
using namespace ecf;

// #define DEBUG_DAYS 1
Expand Down
6 changes: 2 additions & 4 deletions libs/attribute/src/ecflow/attribute/GenericAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include "ecflow/core/Str.hpp"

using namespace ecf;
using namespace boost;
using namespace std;

const GenericAttr& GenericAttr::EMPTY() {
static const GenericAttr GENERICATTR = GenericAttr();
Expand All @@ -27,14 +25,14 @@ const GenericAttr& GenericAttr::EMPTY() {
GenericAttr::GenericAttr(const std::string& name, const std::vector<std::string>& values)
: name_(name),
values_(values) {
string msg;
std::string msg;
if (!Str::valid_name(name, msg)) {
throw std::runtime_error("GenericAttr::GenericAttr : Invalid generic name : " + msg);
}
}

GenericAttr::GenericAttr(const std::string& name) : name_(name) {
string msg;
std::string msg;
if (!Str::valid_name(name, msg)) {
throw std::runtime_error("GenericAttr::GenericAttr : Invalid generic name : " + msg);
}
Expand Down
2 changes: 0 additions & 2 deletions libs/attribute/src/ecflow/attribute/LateAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "ecflow/core/Str.hpp"
#include "ecflow/core/TimeSeries.hpp"

using namespace std;

namespace ecf {

LateAttr::LateAttr() = default;
Expand Down
5 changes: 2 additions & 3 deletions libs/attribute/src/ecflow/attribute/NodeAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "ecflow/core/Serialization.hpp"
#include "ecflow/core/Str.hpp"

using namespace std;
using namespace ecf;

const std::string& Event::SET() {
Expand Down Expand Up @@ -50,7 +49,7 @@ Event::Event(int number, const std::string& eventName, bool iv, bool check_name)
v_(iv),
iv_(iv) {
if (!eventName.empty() && check_name) {
string msg;
std::string msg;
if (!Str::valid_name(eventName, msg)) {
throw std::runtime_error("Event::Event: Invalid event name : " + msg);
}
Expand Down Expand Up @@ -83,7 +82,7 @@ Event::Event(const std::string& eventName, bool iv) : n_(eventName), v_(iv), iv_
}
}

string msg;
std::string msg;
if (!Str::valid_name(eventName, msg)) {
throw std::runtime_error("Event::Event: Invalid event name : " + msg);
}
Expand Down
7 changes: 3 additions & 4 deletions libs/attribute/src/ecflow/attribute/QueueAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "ecflow/core/Serialization.hpp"
#include "ecflow/core/Str.hpp"

using namespace std;
using namespace ecf;

/////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -34,7 +33,7 @@ QueueAttr& QueueAttr::EMPTY1() {
QueueAttr::QueueAttr(const std::string& name, const std::vector<std::string>& theQueue)
: theQueue_(theQueue),
name_(name) {
string msg;
std::string msg;
if (!Str::valid_name(name, msg)) {
throw std::runtime_error("QueueAttr::QueueAttr: Invalid queue name : " + msg);
}
Expand Down Expand Up @@ -151,7 +150,7 @@ std::string QueueAttr::no_of_aborted() const {
if (count != 0) {
return ecf::convert_to<std::string>(count);
}
return std::string();
return std::string{};
}

void QueueAttr::reset_index_to_first_queued_or_aborted() {
Expand Down Expand Up @@ -279,7 +278,7 @@ void QueueAttr::set_state_vec(const std::vector<NState::State>& state_vec) {
}

void QueueAttr::set_name(const std::string& name) {
string msg;
std::string msg;
if (!Str::valid_name(name, msg)) {
throw std::runtime_error("QueueAttr::set_name: Invalid queue name : " + msg);
}
Expand Down
Loading
Loading