Skip to content

Commit

Permalink
Also fix objc++
Browse files Browse the repository at this point in the history
find . -name .git -prune -o -name .environment -prune -o -name third_party -prune -o -name zzz_generated -prune -o -name out -prune -o -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.mm' \) -exec sed -i 's,^\( *\)\(static \|extern \|\)\(inline \|\)\(constexpr \|\)const char *\* * k\([A-Z][^][ ;()]*\)\( \|;\),\1\2\3\4const char k\5[]\6,g; s,^\([^()]*\)constexpr const char k\([^()]*\)\( \|;\),\1constexpr char k\2\3,g; s,^\(  *\)const\(expr\|\) char \([^()]*\)\[\] *= ",\1static const\2 char \3[] = ",g' {} +
  • Loading branch information
mspang committed Dec 5, 2023
1 parent b6c264a commit aba4909
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
std::map<std::string, MTRDeviceController *> CHIPCommandBridge::mControllers;
dispatch_queue_t CHIPCommandBridge::mOTAProviderCallbackQueue;
OTAProviderDelegate * CHIPCommandBridge::mOTADelegate;
constexpr const char * kTrustStorePathVariable = "PAA_TRUST_STORE_PATH";
constexpr char kTrustStorePathVariable[] = "PAA_TRUST_STORE_PATH";

CHIPToolKeypair * gNocSigner = [[CHIPToolKeypair alloc] init];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@

#include <string>

constexpr const char * kClusterIdKey = "clusterId";
constexpr const char * kEndpointIdKey = "endpointId";
constexpr const char * kAttributeIdKey = "attributeId";
constexpr const char * kCommandIdKey = "commandId";
constexpr const char * kErrorIdKey = "error";
constexpr const char * kClusterErrorIdKey = "clusterError";
constexpr const char * kValueKey = "value";

constexpr const char kBase64Header[] = "base64:";
constexpr char kClusterIdKey[] = "clusterId";
constexpr char kEndpointIdKey[] = "endpointId";
constexpr char kAttributeIdKey[] = "attributeId";
constexpr char kCommandIdKey[] = "commandId";
constexpr char kErrorIdKey[] = "error";
constexpr char kClusterErrorIdKey[] = "clusterError";
constexpr char kValueKey[] = "value";

constexpr char kBase64Header[] = "base64:";

namespace {
RemoteDataModelLoggerDelegate * gDelegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

#include <editline.h>

constexpr const char * kInteractiveModePrompt = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> ";
constexpr const char * kInteractiveModeHistoryFilePath = "/tmp/darwin_framework_tool_history";
constexpr const char * kInteractiveModeStopCommand = "quit()";
constexpr const char * kCategoryError = "Error";
constexpr const char * kCategoryProgress = "Info";
constexpr const char * kCategoryDetail = "Debug";
constexpr char kInteractiveModePrompt[] = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> ";
constexpr char kInteractiveModeHistoryFilePath[] = "/tmp/darwin_framework_tool_history";
constexpr char kInteractiveModeStopCommand[] = "quit()";
constexpr char kCategoryError[] = "Error";
constexpr char kCategoryProgress[] = "Info";
constexpr char kCategoryDetail[] = "Debug";

namespace {

Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using namespace chip::Ble;
#endif // CONFIG_NETWORK_LAYER_BLE

constexpr const char * kBleKey = "BLE";
constexpr char kBleKey[] = "BLE";

@implementation MTRCommissionableBrowserResultInterfaces
@end
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTROperationalBrowser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <platform/LockTracker.h>

namespace {
constexpr const char kLocalDot[] = "local.";
constexpr const char kOperationalType[] = "_matter._tcp";
constexpr char kLocalDot[] = "local.";
constexpr char kOperationalType[] = "_matter._tcp";
constexpr DNSServiceFlags kBrowseFlags = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/Darwin/BleConnectionDelegateImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
constexpr uint64_t kScanningWithoutDelegateTimeoutInSeconds = 120;
constexpr uint64_t kCachePeripheralTimeoutInSeconds
= static_cast<uint64_t>(CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX / 1000.0 * 8.0 * 0.625);
constexpr const char * kBleWorkQueueName = "org.csa-iot.matter.framework.ble.workqueue";
constexpr char kBleWorkQueueName[] = "org.csa-iot.matter.framework.ble.workqueue";

typedef NS_ENUM(uint8_t, BleConnectionMode) {
kUndefined = 0,
Expand Down

0 comments on commit aba4909

Please sign in to comment.