From 93de2fcdc24289942ca42ee44f01628cb432dd46 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Wed, 27 Mar 2024 17:36:01 +0100 Subject: [PATCH] Remove unnecessary comments --- lib/membrane/core/bin.ex | 2 -- lib/membrane/core/element.ex | 2 -- lib/membrane/core/element/action_handler.ex | 3 --- lib/membrane/core/element/buffer_controller.ex | 1 - 4 files changed, 8 deletions(-) diff --git a/lib/membrane/core/bin.ex b/lib/membrane/core/bin.ex index 9c3ce1950..37b09b22a 100644 --- a/lib/membrane/core/bin.ex +++ b/lib/membrane/core/bin.ex @@ -70,8 +70,6 @@ defmodule Membrane.Core.Bin do if node do result = :rpc.call(node, GenServer, :start, [__MODULE__, options]) - - # TODO: use an atomic way of linking once https://github.com/erlang/otp/issues/6375 is solved with {:start_link, {:ok, pid}} <- {method, result}, do: Process.link(pid) result else diff --git a/lib/membrane/core/element.ex b/lib/membrane/core/element.ex index c4776867f..bc1ba9f6a 100644 --- a/lib/membrane/core/element.ex +++ b/lib/membrane/core/element.ex @@ -86,8 +86,6 @@ defmodule Membrane.Core.Element do # rpc if necessary if node do result = :rpc.call(node, GenServer, :start, [__MODULE__, options]) - - # TODO: use an atomic way of linking once https://github.com/erlang/otp/issues/6375 is solved with {:start_link, {:ok, pid}} <- {method, result}, do: Process.link(pid) result else diff --git a/lib/membrane/core/element/action_handler.ex b/lib/membrane/core/element/action_handler.ex index df8603e8d..0fc4f068c 100644 --- a/lib/membrane/core/element/action_handler.ex +++ b/lib/membrane/core/element/action_handler.ex @@ -348,7 +348,6 @@ defmodule Membrane.Core.Element.ActionHandler do stalker_metrics: stalker_metrics } when stream_format != nil <- pad_data do - # todo: move this function to one of the controllers, to avoid redundant PadModet.get_data in the function below state = DemandController.decrease_demand_by_outgoing_buffers(pad_ref, buffers, state) :atomics.add(stalker_metrics.total_buffers, 1, length(buffers)) Message.send(pid, :buffer, buffers, for_pad: other_ref) @@ -422,7 +421,6 @@ defmodule Membrane.Core.Element.ActionHandler do defp delay_supplying_demand(pad_ref, size, state) do with %{direction: :input, flow_control: :manual} <- PadModel.get_data!(state, pad_ref) do - # todo: get_data! above could be eradicated state = ManualFlowController.update_demand(pad_ref, size, state) ManualFlowController.delay_supplying_demand(pad_ref, state) else @@ -444,7 +442,6 @@ defmodule Membrane.Core.Element.ActionHandler do when type in [:source, :filter, :endpoint] do with %{direction: :output, flow_control: :manual} <- PadModel.get_data!(state, pad_ref) do - # todo: get_data! above could be eradicated ManualFlowController.delay_redemand(pad_ref, state) else %{direction: :input} -> diff --git a/lib/membrane/core/element/buffer_controller.ex b/lib/membrane/core/element/buffer_controller.ex index 397a01be4..b8f0feb3d 100644 --- a/lib/membrane/core/element/buffer_controller.ex +++ b/lib/membrane/core/element/buffer_controller.ex @@ -63,7 +63,6 @@ defmodule Membrane.Core.Element.BufferController do end end - # todo: move it to the flow controllers? @spec do_handle_ingoing_buffers( Pad.ref(), PadModel.pad_data(),