CR, move duplicate consts to top of file.

This commit is contained in:
Kalila L 2020-12-11 15:55:24 -05:00
parent cec112dd28
commit 0468c98c30

View file

@ -68,6 +68,9 @@ Q_LOGGING_CATEGORY(domain_server_ice, "hifi.domain_server.ice")
const QString ACCESS_TOKEN_KEY_PATH = "metaverse.access_token";
const QString DomainServer::REPLACEMENT_FILE_EXTENSION = ".replace";
const QString PUBLIC_SOCKET_ADDRESS_KEY = "network_address";
const QString PUBLIC_SOCKET_PORT_KEY = "network_port";
const QString DOMAIN_UPDATE_AUTOMATIC_NETWORKING_KEY = "automatic_networking";
const int MIN_PORT = 1;
const int MAX_PORT = 65535;
@ -1503,11 +1506,7 @@ QJsonObject jsonForDomainSocketUpdate(const HifiSockAddr& socket) {
return socketObject;
}
const QString DOMAIN_UPDATE_AUTOMATIC_NETWORKING_KEY = "automatic_networking";
void DomainServer::performIPAddressPortUpdate(const HifiSockAddr& newPublicSockAddr) {
static const QString PUBLIC_SOCKET_ADDRESS_KEY = "network_address";
static const QString PUBLIC_SOCKET_PORT_KEY = "network_port";
const QString& publicSocketAddress = newPublicSockAddr.getAddress().toString();
const int publicSocketPort = newPublicSockAddr.getPort();
@ -1532,9 +1531,6 @@ void DomainServer::sendHeartbeatToMetaverse(const QString& networkAddress, const
static const QString PROTOCOL_VERSION_KEY = "protocol";
domainObject[PROTOCOL_VERSION_KEY] = protocolVersionsSignatureBase64();
static const QString PUBLIC_SOCKET_ADDRESS_KEY = "network_address";
static const QString PUBLIC_SOCKET_PORT_KEY = "network_port";
static const QString NETWORK_ADDRESS_SETTINGS_KEY = "domain_server." + PUBLIC_SOCKET_ADDRESS_KEY;
const QString networkAddressFromSettings = _settingsManager.valueForKeyPath(NETWORK_ADDRESS_SETTINGS_KEY).toString();
if (!networkAddress.isEmpty()) {