1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 06:43:24 +03:00

Refactor slightly

This commit is contained in:
Tae Won Ha 2018-01-22 20:09:48 +01:00
parent 5fed3ac962
commit 3b6ab29b94
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -296,7 +296,7 @@ class UiBridge {
}
private func establishNvimConnection() {
self.remoteServerPort = CFMessagePortCreateRemote(kCFAllocatorDefault, self.remoteServerName.CFStr)
self.remoteServerPort = CFMessagePortCreateRemote(kCFAllocatorDefault, self.remoteServerName.cfStr)
self.sendMessage(msgId: .agentReady, data: [self.initialWidth, self.initialHeight].data())
}
@ -396,7 +396,7 @@ class UiBridge {
self.localServerPort = CFMessagePortCreateLocal(
kCFAllocatorDefault,
self.localServerName.CFStr,
self.localServerName.cfStr,
{ _, msgid, data, info in
return info?
.load(as: MessageHandler.self)
@ -463,7 +463,7 @@ private extension CFData {
private extension String {
var CFStr: CFString {
var cfStr: CFString {
return self as NSString
}
}