Skip to content

Commit 20a801e

Browse files
committed
No need to save options
1 parent 7aad73b commit 20a801e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Bot.vala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace ToxVapi {
88
private const string TOX_SAVE = "Bot.tox";
99

1010
private Tox handle;
11-
private Options options;
1211

1312
private bool connected = false;
1413

@@ -22,19 +21,19 @@ namespace ToxVapi {
2221
ToxCore.Version.PATCH
2322
);
2423

25-
this.options = Options () {
24+
var options = Options () {
2625
ipv6_enabled = true,
2726
udp_enabled = true,
2827
proxy_type = ProxyType.NONE
2928
};
3029

3130
// Load/Create the Tox_save.
3231
if (FileUtils.test (this.TOX_SAVE, FileTest.EXISTS)) {
33-
FileUtils.get_data (this.TOX_SAVE, out this.options.savedata_data);
34-
this.options.savedata_type = SaveDataType.TOX_SAVE;
32+
FileUtils.get_data (this.TOX_SAVE, out options.savedata_data);
33+
options.savedata_type = SaveDataType.TOX_SAVE;
3534
}
3635

37-
this.handle = new Tox (this.options, null);
36+
this.handle = new Tox (options, null);
3837
this.bootstrap ();
3938
Timeout.add (handle.iteration_interval (), () => {
4039
handle.iterate ();

0 commit comments

Comments
 (0)