Skip to content

Commit

Permalink
Added missing optional include
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitozz committed May 24, 2024
1 parent b7e8d04 commit d5d54a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/irisnet/corelib/netnames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <QRandomGenerator>
#endif
#include <limits>
#include <optional>

#define NNDEBUG (qDebug() << this << "#" << __FUNCTION__ << ":")
static std::optional<bool> enable_logs;
Expand Down Expand Up @@ -371,7 +372,8 @@ class ServiceInstance::Private : public QSharedData {
ServiceInstance::ServiceInstance() : d(new Private) { }

ServiceInstance::ServiceInstance(const QString &instance, const QString &type, const QString &domain,
const QMap<QString, QByteArray> &attribs) : d(new Private)
const QMap<QString, QByteArray> &attribs) :
d(new Private)
{
d->instance = instance;
d->type = type;
Expand Down Expand Up @@ -1218,8 +1220,9 @@ void ServiceResolver::start(const QStringList &services, const QString &transpor
[this, resolver, stats, service](const QList<XMPP::NameRecord> &r) {
NNLOG(NNDEBUG << "sl:" << r);
QList<ServiceBoundRecord> sbr;
std::transform(r.begin(), r.end(), std::back_inserter(sbr),
[service](auto const &r) { return ServiceBoundRecord { service, r }; });
std::transform(r.begin(), r.end(), std::back_inserter(sbr), [service](auto const &r) {
return ServiceBoundRecord { service, r };
});
d->srvList << sbr;
stats->finishOne(true);
cleanup_resolver(resolver);
Expand Down
2 changes: 2 additions & 0 deletions src/irisnet/noncore/cutestuff/bsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <QTcpSocket>
#include <QTimer>

#include <optional>

// #include <limits> // if it's still needed please comment why

#define BSDEBUG (qDebug() << this << "#" << __FUNCTION__ << ":")
Expand Down

0 comments on commit d5d54a3

Please sign in to comment.