summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-09 13:26:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-09-09 12:42:25 +0000
commit20c14c812ccc00692d42d294d3b8dea1774e3511 (patch)
treed48011cd869cf64069c84d1494f504f6f59b8ed1 /shell
parent9dc0f2b703d8fbc8698a3cf36949a981e55b68c6 (diff)
loplugin:constantparam in sfx2
Change-Id: If5d401001abb7bf3fc642d47f537b57836e6d9c5 Reviewed-on: https://gerrit.libreoffice.org/28772 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/xml_parser.hxx2
-rw-r--r--shell/source/all/xml_parser.cxx4
-rw-r--r--shell/source/sessioninstall/SyncDbusSessionHelper.cxx8
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx5
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx6
5 files changed, 11 insertions, 14 deletions
diff --git a/shell/inc/xml_parser.hxx b/shell/inc/xml_parser.hxx
index 90aa36638c76..3ef5ada394ac 100644
--- a/shell/inc/xml_parser.hxx
+++ b/shell/inc/xml_parser.hxx
@@ -45,7 +45,7 @@ class i_xml_parser_event_handler;
class xml_parser
{
public:
- xml_parser(const XML_Char* EncodingName = nullptr);
+ xml_parser();
~xml_parser();
diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx
index 3c4dd0bb893b..6f466477aaed 100644
--- a/shell/source/all/xml_parser.cxx
+++ b/shell/source/all/xml_parser.cxx
@@ -69,9 +69,9 @@ namespace /* private */
}
}
-xml_parser::xml_parser(const XML_Char* EncodingName) :
+xml_parser::xml_parser() :
document_handler_(nullptr),
- xml_parser_(XML_ParserCreate(EncodingName))
+ xml_parser_(XML_ParserCreate(nullptr))
{
init();
}
diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
index 2b6659a67d22..a578b488e23d 100644
--- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
@@ -25,7 +25,7 @@ namespace
{
GError* m_pError;
public:
- explicit GErrorWrapper(GError* pError) : m_pError(pError) {}
+ explicit GErrorWrapper() : m_pError(nullptr) {}
~GErrorWrapper() noexcept(false)
{
if(!m_pError)
@@ -41,7 +41,7 @@ namespace
const OString sFullInterface = OUStringToOString("org.freedesktop.PackageKit." + sInterface, RTL_TEXTENCODING_ASCII_US);
GDBusProxy* proxy = nullptr;
{
- GErrorWrapper error(nullptr);
+ GErrorWrapper error;
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE, nullptr,
"org.freedesktop.PackageKit",
@@ -71,7 +71,7 @@ void request(
auto iactUtf8(OUStringToOString(interaction, RTL_TEXTENCODING_UTF8));
std::shared_ptr<GDBusProxy> proxy(
lcl_GetPackageKitProxy("Modify"), GObjectDeleter<GDBusProxy>());
- GErrorWrapper error(nullptr);
+ GErrorWrapper error;
g_dbus_proxy_call_sync(
proxy.get(), method,
g_variant_new(
@@ -168,7 +168,7 @@ void SyncDbusSessionHelper::InstallPrinterDrivers(
const OString sPackagenameAscii = OUStringToOString(sPackagename, RTL_TEXTENCODING_ASCII_US);
const OString sInteractionAscii = OUStringToOString(sInteraction, RTL_TEXTENCODING_ASCII_US);
std::shared_ptr<GDBusProxy> proxy(lcl_GetPackageKitProxy("Query"), GObjectDeleter<GDBusProxy>());
- GErrorWrapper error(nullptr);
+ GErrorWrapper error;
std::shared_ptr<GVariant> result(g_dbus_proxy_call_sync (proxy.get(),
"IsInstalled",
g_variant_new ("(ss)",
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index 75af049601a4..c1b03c8f6f60 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -130,12 +130,11 @@ class StreamExceptionsEnabler
{
public:
explicit StreamExceptionsEnabler(
- std::ios& iostrm,
- std::ios::iostate NewIos = std::ios::failbit | std::ios::badbit) :
+ std::ios& iostrm ) :
m_IoStrm(iostrm),
m_OldIos(m_IoStrm.exceptions())
{
- m_IoStrm.exceptions(NewIos);
+ m_IoStrm.exceptions(std::ios::failbit | std::ios::badbit);
}
~StreamExceptionsEnabler()
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index d6be7b63f33b..9d19de32b555 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -305,11 +305,9 @@ namespace /* private */ {
class recent_item_writer
{
public:
- recent_item_writer(
- recently_used_file& file,
- int max_items_to_write = MAX_RECENTLY_USED_ITEMS) :
+ recent_item_writer( recently_used_file& file ) :
file_(file),
- max_items_to_write_(max_items_to_write),
+ max_items_to_write_(MAX_RECENTLY_USED_ITEMS),
items_written_(0)
{}