Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void ResizeChannel(BinaryMessenger* messenger, std::string name, int new_size) {
messenger, kControlChannelName, &StandardMethodCodec::GetInstance());

// The deserialization logic handles only 32 bits values, see
// https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L495.
// https://github.com/flutter/flutter/blob/230240c56880f2c19bf92d2c32203b064054f173/engine/src/flutter/lib/ui/channel_buffers.dart#L523
control_channel->InvokeMethod(
kResizeMethod, std::make_unique<EncodableValue>(EncodableList{
EncodableValue(name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ struct StreamHandlerError {
const std::string error_message;
const std::unique_ptr<T> error_details;

StreamHandlerError(const std::string error_code,
const std::string error_message,
StreamHandlerError(const std::string& error_code,
const std::string& error_message,
std::unique_ptr<T>&& error_details)
: error_code(error_code),
error_message(error_message),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StreamHandlerFunctions : public StreamHandler<T> {
// for the corresponding StreamHandler outcomes.
StreamHandlerFunctions(StreamHandlerListen<T> on_listen,
StreamHandlerCancel<T> on_cancel)
: on_listen_(on_listen), on_cancel_(on_cancel) {}
: on_listen_(std::move(on_listen)), on_cancel_(std::move(on_cancel)) {}

virtual ~StreamHandlerFunctions() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MethodChannel {
// Destroying the MethodChannel will not unregister the handler, so
// the caller is responsible for unregistering explicitly if the handler
// stops being valid before the engine is destroyed.
void SetMethodCallHandler(MethodCallHandler<T> handler) const {
void SetMethodCallHandler(const MethodCallHandler<T>& handler) const {
if (!handler) {
messenger_->SetMessageHandler(name_, nullptr);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class MethodResultFunctions : public MethodResult<T> {
MethodResultFunctions(ResultHandlerSuccess<T> on_success,
ResultHandlerError<T> on_error,
ResultHandlerNotImplemented<T> on_not_implemented)
: on_success_(on_success),
on_error_(on_error),
: on_success_(std::move(on_success)),
on_error_(std::move(on_error)),
on_not_implemented_(std::move(on_not_implemented)) {}

virtual ~MethodResultFunctions() = default;
Expand Down
Loading