Grouping unused gen_server callbacks.
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 28 Jul 2012 18:13:45 +0000 (14:13 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 28 Jul 2012 18:13:45 +0000 (14:13 -0400)
001/src/life_cell.erl
001/src/life_time.erl

index a77e279..9f7b171 100644 (file)
@@ -38,6 +38,16 @@ start_link({_, Name, _}=Datum) ->
     gen_server:start_link(ServerName, ?MODULE, Args, Opts).
 
 
+%% ============================================================================
+%% Callbacks (unused)
+%% ============================================================================
+
+handle_call(_Msg, _From, State)  -> {reply, ok, State}.
+handle_info(_Msg, State)         -> {noreply, State}.
+code_change(_Old, State, _Other) -> {ok, State}.
+terminate(_Reason, State)        -> {ok, State}.
+
+
 %% ============================================================================
 %% Callbacks
 %% ============================================================================
@@ -55,18 +65,6 @@ init([{CellID, Name, NeighborNames}]) ->
     {ok, State}.
 
 
-terminate(_Reason, State) ->
-    {ok, State}.
-
-
-code_change(_Old, State, _Other) ->
-    {ok, State}.
-
-
-handle_call(_Msg, _From, State) ->
-    {reply, ok, State}.
-
-
 handle_cast({next_gen, GenID},
     #state{name=Name
           ,cell_state=CellState
@@ -139,10 +137,6 @@ handle_cast(_Msg, State) ->
     {noreply, State}.
 
 
-handle_info(_Msg, State) ->
-    {noreply, State}.
-
-
 %% ============================================================================
 %% Internal
 %% ============================================================================
index e2ee30e..22d3300 100644 (file)
@@ -51,6 +51,16 @@ report_state(CellID, GenID, CellState) ->
     gen_server:cast(?MODULE, {report_state, {CellID, GenID, CellState}}).
 
 
+%% ============================================================================
+%% Callbacks (unused)
+%% ============================================================================
+
+handle_call(_Msg, _From, State)  -> {reply, ok, State}.
+handle_info(_Msg, State)         -> {noreply, State}.
+code_change(_Old, State, _Other) -> {ok, State}.
+terminate(_Reason, State)        -> {ok, State}.
+
+
 %% ============================================================================
 %% Callbacks
 %% ============================================================================
@@ -68,18 +78,6 @@ init([X, Y, Cells]) ->
     {ok, State}.
 
 
-terminate(_Reason, State) ->
-    {ok, State}.
-
-
-code_change(_Old, State, _Other) ->
-    {ok, State}.
-
-
-handle_call(_Msg, _From, State) ->
-    {reply, ok, State}.
-
-
 handle_cast(next_gen,
     #state{cells=Cells
           ,num_cells=NumCells
@@ -141,10 +139,6 @@ handle_cast(_Msg, State) ->
     {noreply, State}.
 
 
-handle_info(_Msg, State) ->
-    {noreply, State}.
-
-
 %% ============================================================================
 %% Internal
 %% ============================================================================
This page took 0.023758 seconds and 4 git commands to generate.