|
1 | 1 | #include "DQMServices/Core/interface/DQMNet.h" |
2 | 2 | #include "classlib/iobase/InetServerSocket.h" |
3 | 3 | #include "classlib/iobase/LocalServerSocket.h" |
4 | | -#include "classlib/iobase/Filename.h" |
5 | 4 | #include "classlib/sysapi/InetSocket.h" // for completing InetAddress |
6 | | -#include "classlib/utils/TimeInfo.h" |
7 | | -#include "classlib/utils/StringList.h" |
8 | | -#include "classlib/utils/StringFormat.h" |
9 | | -#include "classlib/utils/StringOps.h" |
10 | 5 | #include "classlib/utils/SystemError.h" |
11 | 6 | #include "classlib/utils/Regexp.h" |
| 7 | +#include <fmt/format.h> |
12 | 8 | #include <unistd.h> |
13 | 9 | #include <fcntl.h> |
14 | 10 | #include <sys/wait.h> |
@@ -832,8 +828,8 @@ bool DQMNet::onPeerConnect(IOSelectEvent *ev) { |
832 | 828 | if (auto *inet = dynamic_cast<InetSocket *>(s)) { |
833 | 829 | InetAddress peeraddr = inet->peername(); |
834 | 830 | InetAddress myaddr = inet->sockname(); |
835 | | - p->peeraddr = StringFormat("%1:%2").arg(peeraddr.hostname()).arg(peeraddr.port()).value(); |
836 | | - localaddr = StringFormat("%1:%2").arg(myaddr.hostname()).arg(myaddr.port()).value(); |
| 831 | + p->peeraddr = fmt::format("{}:{}", peeraddr.hostname(), peeraddr.port()); |
| 832 | + localaddr = fmt::format("{}:{}", myaddr.hostname(), myaddr.port()); |
837 | 833 | } else if (auto *local = dynamic_cast<LocalSocket *>(s)) { |
838 | 834 | p->peeraddr = local->peername().path(); |
839 | 835 | localaddr = local->sockname().path(); |
@@ -1130,7 +1126,7 @@ void DQMNet::run() { |
1130 | 1126 |
|
1131 | 1127 | InetAddress peeraddr = ((InetSocket *)s)->peername(); |
1132 | 1128 | InetAddress myaddr = ((InetSocket *)s)->sockname(); |
1133 | | - p->peeraddr = StringFormat("%1:%2").arg(peeraddr.hostname()).arg(peeraddr.port()).value(); |
| 1129 | + p->peeraddr = fmt::format("{}:{}", peeraddr.hostname(), peeraddr.port()); |
1134 | 1130 | p->mask = IORead | IOWrite | IOUrgent; |
1135 | 1131 | p->update = ap->update; |
1136 | 1132 | p->automatic = ap; |
|
0 commit comments