Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d7510bf

Browse files
committed
Address review comments
1 parent be3ed4f commit d7510bf

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

shell/platform/common/client_wrapper/basic_message_channel_unittests.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ class TestBinaryMessenger : public BinaryMessenger {
2525
send_called_ = true;
2626
int length = static_cast<int>(message_size);
2727
last_message_size_ = length;
28-
std::vector<uint8_t> last_message(length);
29-
memcpy(&last_message[0], &message[0], length * sizeof(uint8_t));
30-
last_message_ = last_message;
28+
last_message_ =
29+
std::vector<uint8_t>(message, message + length * sizeof(uint8_t));
3130
}
3231

3332
void SetMessageHandler(const std::string& channel,

shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "binary_messenger.h"
1313
#include "message_codec.h"
1414
#include "method_channel.h"
15-
#include "standard_method_codec.h"
15+
1616
namespace flutter {
1717

1818
class EncodableValue;

shell/platform/common/client_wrapper/include/flutter/method_channel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
#include "method_result.h"
1616
#include "standard_method_codec.h"
1717

18+
namespace flutter {
19+
1820
static constexpr char kControlChannelName[] = "dev.flutter/channel-buffers";
1921
static constexpr char kResizeMethod[] = "resize";
2022
static constexpr char kOverflowMethod[] = "overflow";
2123

22-
namespace flutter {
23-
2424
class EncodableValue;
2525

2626
// A handler for receiving a method call from the Flutter engine.

0 commit comments

Comments
 (0)