Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed a warning wrt Opa v0.9.2

  • Loading branch information...
commit f198dbdd50d9bf5f2c412ad7ffa1290da8deb5b1 1 parent c94e5a0
Frederic Ye Aqua-Ye authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 src/modeler/sceneServer.opa
14 src/modeler/sceneServer.opa
@@ -9,16 +9,16 @@ type Modeler.Shared.modeler = {
9 9
10 10 @server `Modeler.Shared` = {{
11 11
12   - empty(server_id, address) : Modeler.Shared.modeler =
  12 + empty(server_id, address) : Modeler.Shared.modeler =
13 13 { scene=Scene.empty(SHF, server_id); ~address; clients=List.empty };
14 14
15 15 add_client(modsha, client) : Modeler.Shared.modeler =
16 16 do Session.send(client, { load=modsha.scene });
17 17 { modsha with clients=List.cons(client, modsha.clients) };
18 18
19   - apply_patch(modsha, patch) : Modeler.Shared.modeler =
  19 + apply_patch(modsha, patch) : Modeler.Shared.modeler =
20 20 do Log.info("Modeler.Shared", "a patch as been apply for address '{modsha.address}'");
21   - do
  21 + do
22 22 f(c) = Session.send(c, { write_patch; ~patch});
23 23 List.iter(f, modsha.clients);
24 24 { modsha with scene=Scene.apply_patch(modsha.scene, patch) };
@@ -27,13 +27,13 @@ type Modeler.Shared.modeler = {
27 27
28 28
29 29 type Central.Modelers.state = { my_id: int; files: stringmap(Modeler.Shared.modeler) };
30   -type Central.Modelers.message =
  30 +type Central.Modelers.message =
31 31 { register; scene_url: string; sync_channel: channel(Central.Modelers.sync.message); client_id: int }
32 32 / { apply_patch; patch: Scene.patch; address: string }
33 33 / { with_address_list : list(string) -> void }
34 34 ;
35 35
36   -type Central.Modelers.sync.message =
  36 +type Central.Modelers.sync.message =
37 37 { load: Scene.scene }
38 38 / { write_patch; patch: Scene.patch };
39 39
@@ -68,7 +68,7 @@ type Central.Modelers.sync.message =
68 68 on_message(state : Central.Modelers.state, message) = match message with
69 69 | { register; ~scene_url; ~sync_channel; client_id=_ } ->
70 70 do Log.info("CM", "register for url '{scene_url}'");
71   - state =
  71 + state =
72 72 up(modsha) = `Modeler.Shared`.add_client(modsha, sync_channel);
73 73 `Central.Modelers`.update_file(state, scene_url, up);
74 74 { set=state }
@@ -76,7 +76,7 @@ type Central.Modelers.sync.message =
76 76 state = `Central.Modelers`.apply_patch(state, address, patch);
77 77 { set=state }
78 78 | { ~with_address_list } ->
79   - l = List.sort_by((_ -> Random.int(max_int)), `Central.Modelers`.get_address_list(state));
  79 + l = List.sort_by((_ -> Random.int(Limits.max_int)), `Central.Modelers`.get_address_list(state));
80 80 _ = with_address_list(l)
81 81 { unchanged }
82 82 end;

0 comments on commit f198dbd

Please sign in to comment.
Something went wrong with that request. Please try again.