aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorlinkmauve <linkmauve@linkmauve.fr>2017-10-23 15:10:15 +0100
committerfiaxh <fiaxh@users.noreply.github.com>2017-10-23 16:10:15 +0200
commit1e1aa704a2e50d8712878253eaf8ec3d3c4a15d9 (patch)
tree9b2e749b0d7de8d20067ce47ae7ff824fa12a0aa /libdino/src
parente7b5aa140b49bfad2f64c6a4a18fa7878d9680d9 (diff)
downloaddino-1e1aa704a2e50d8712878253eaf8ec3d3c4a15d9.tar.gz
dino-1e1aa704a2e50d8712878253eaf8ec3d3c4a15d9.zip
Remove new from struct initialisation, as it is deprecated (#180)
* Remove new from struct initialisation, as it is deprecated. * Use Map.has_key instead of Map.contains, as it is deprecated.
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/connection_manager.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala
index f9dbb0e1..3f945f4c 100644
--- a/libdino/src/service/connection_manager.vala
+++ b/libdino/src/service/connection_manager.vala
@@ -58,7 +58,7 @@ public class ConnectionManager {
}
private class RecMutexWrap {
- public RecMutex mutex = new RecMutex();
+ public RecMutex mutex = RecMutex();
public void lock() { mutex.lock(); }
public void unlock() { mutex.unlock(); }
public bool trylock() { return mutex.trylock(); }
@@ -121,7 +121,7 @@ public class ConnectionManager {
}
public Core.XmppStream? connect(Account account) {
- if (!connection_mutexes.contains(account)) connection_mutexes[account] = new RecMutexWrap();
+ if (!connection_mutexes.has_key(account)) connection_mutexes[account] = new RecMutexWrap();
if (!connection_todo.contains(account)) connection_todo.add(account);
if (!connections.has_key(account)) {
return connect_(account);