Change string macros to static constexpr
Summary: There's no need for these to be macros. Reviewed By: priteshrnandgaonkar Differential Revision: D9555471 fbshipit-source-id: a78d6cdb4ceb1830f749eda50e0e07ebc55723bf
This commit is contained in:
committed by
Facebook Github Bot
parent
afea2f63ec
commit
243b4207e7
@@ -5,12 +5,6 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <folly/json.h>
|
#include <folly/json.h>
|
||||||
|
|
||||||
#define CSR_FILE_NAME "app.csr"
|
|
||||||
#define SONAR_CA_FILE_NAME "sonarCA.crt"
|
|
||||||
#define CLIENT_CERT_FILE_NAME "device.crt"
|
|
||||||
#define PRIVATE_KEY_FILE "privateKey.pem"
|
|
||||||
#define CONNECTION_CONFIG_FILE "connection_config.json"
|
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#define SONAR_LOG(message) \
|
#define SONAR_LOG(message) \
|
||||||
@@ -21,6 +15,12 @@
|
|||||||
|
|
||||||
using namespace facebook::sonar;
|
using namespace facebook::sonar;
|
||||||
|
|
||||||
|
static constexpr auto CSR_FILE_NAME = "app.csr";
|
||||||
|
static constexpr auto SONAR_CA_FILE_NAME = "sonarCA.crt";
|
||||||
|
static constexpr auto CLIENT_CERT_FILE_NAME = "device.crt";
|
||||||
|
static constexpr auto PRIVATE_KEY_FILE = "privateKey.pem";
|
||||||
|
static constexpr auto CONNECTION_CONFIG_FILE = "connection_config.json";
|
||||||
|
|
||||||
bool fileExists(std::string fileName);
|
bool fileExists(std::string fileName);
|
||||||
std::string loadStringFromFile(std::string fileName);
|
std::string loadStringFromFile(std::string fileName);
|
||||||
void writeStringToFile(std::string content, std::string fileName);
|
void writeStringToFile(std::string content, std::string fileName);
|
||||||
|
|||||||
Reference in New Issue
Block a user