summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-14 16:53:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-16 14:18:17 +0000
commit480e84d88d96d2d245b653613a9b83f3d7120ed8 (patch)
tree508d5ac0095cfceade99fc552578de61d7815d22 /sd/source/ui
parent6ac0e9f4d121584c75961bc5b1be739f9fa91f3b (diff)
clang-cl loplugin: sd
Change-Id: I26a1e20a3b811aea535994cda2e49a9c39df64b7 Reviewed-on: https://gerrit.libreoffice.org/29855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/dlg/filedlg.cxx4
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx6
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx6
-rw-r--r--sd/source/ui/remotecontrol/WINNetworkService.cxx2
-rw-r--r--sd/source/ui/remotecontrol/WINNetworkService.hxx8
5 files changed, 14 insertions, 12 deletions
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 0f0c87d6e04e..e5823d139d61 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -273,9 +273,9 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog() :
mpImpl->AddFilter( aDescr, "*.svx");
#else
aDescr = SD_RESSTR(STR_WAV_FILE);
- mpImpl->AddFilter( aDescr, OUString("*.wav;*.mp3;*.ogg" ));
+ mpImpl->AddFilter( aDescr, "*.wav;*.mp3;*.ogg" );
aDescr = SD_RESSTR(STR_MIDI_FILE);
- mpImpl->AddFilter( aDescr, OUString("*.mid" ));
+ mpImpl->AddFilter( aDescr, "*.mid" );
#endif
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index f177d86509e5..30021606e989 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1336,7 +1336,7 @@ void SAL_CALL BluetoothServer::run()
aAddr.btAddr = 0;
aAddr.serviceClassId = GUID_NULL;
aAddr.port = BT_PORT_ANY; // Select any free socket.
- if ( bind( aSocket, (SOCKADDR*) &aAddr, sizeof(aAddr) ) == SOCKET_ERROR )
+ if ( bind( aSocket, reinterpret_cast<SOCKADDR*>(&aAddr), sizeof(aAddr) ) == SOCKET_ERROR )
{
closesocket( aSocket );
WSACleanup();
@@ -1372,7 +1372,7 @@ void SAL_CALL BluetoothServer::run()
L"LibreOffice Impress Remote Control");
aRecord.lpszComment = const_cast<wchar_t *>(
L"Remote control of presentations over bluetooth.");
- aRecord.lpServiceClassId = (LPGUID) &SerialPortServiceClass_UUID;
+ aRecord.lpServiceClassId = const_cast<LPGUID>(&SerialPortServiceClass_UUID);
aRecord.dwNameSpace = NS_BTH;
aRecord.dwNumberOfCsAddrs = 1;
aRecord.lpcsaBuffer = &aAddrInfo;
@@ -1396,7 +1396,7 @@ void SAL_CALL BluetoothServer::run()
while ( true )
{
SOCKET socket;
- if ( (socket = accept(aSocket, (sockaddr*) &aRemoteAddr, &aRemoteAddrLen)) == INVALID_SOCKET )
+ if ( (socket = accept(aSocket, reinterpret_cast<sockaddr*>(&aRemoteAddr), &aRemoteAddrLen)) == INVALID_SOCKET )
{
closesocket( aSocket );
WSACleanup();
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 2ad0062bbcd9..81123828777b 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -138,9 +138,11 @@ void DiscoveryService::setupSockets()
rc = setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
#ifdef _WIN32
- (const char*)
+ reinterpret_cast<const char*>(&multicastRequest),
+ #else
+ &multicastRequest,
#endif
- &multicastRequest, sizeof(multicastRequest));
+ sizeof(multicastRequest));
if (rc)
{
diff --git a/sd/source/ui/remotecontrol/WINNetworkService.cxx b/sd/source/ui/remotecontrol/WINNetworkService.cxx
index faedcf4efd9e..bd2decf6293c 100644
--- a/sd/source/ui/remotecontrol/WINNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/WINNetworkService.cxx
@@ -5,7 +5,7 @@
void sd::WINNetworkService::setup()
{
- DNSServiceErrorType err = DNSServiceRegister(&client, 0, 0, NULL, kREG_TYPE, "local", NULL, 1599, 1, "", NULL, this );
+ DNSServiceErrorType err = DNSServiceRegister(&client, 0, 0, nullptr, kREG_TYPE, "local", nullptr, 1599, 1, "", nullptr, this );
if (kDNSServiceErr_NoError != err)
SAL_WARN("sdremote.wifi", "DNSServiceRegister failed: " << err);
diff --git a/sd/source/ui/remotecontrol/WINNetworkService.hxx b/sd/source/ui/remotecontrol/WINNetworkService.hxx
index 1e3227414bfa..7c4ebda798f7 100644
--- a/sd/source/ui/remotecontrol/WINNetworkService.hxx
+++ b/sd/source/ui/remotecontrol/WINNetworkService.hxx
@@ -15,11 +15,11 @@ namespace sd{
public:
WINNetworkService(const std::string& aname = "", unsigned int aport = 1599)
- : ZeroconfService(aname, aport), client(0) {}
- virtual ~WINNetworkService(){}
+ : ZeroconfService(aname, aport), client(nullptr) {}
+ virtual ~WINNetworkService() override {}
- void clear();
- void setup();
+ void clear() override;
+ void setup() override;
};
}