summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:32:12 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:39 +0100
commit0c141f2ed5219e7329fd94681d68e2205e2ed285 (patch)
tree5f93e6e8edb298785881313497d110379b78d235 /ucb/source/ucp
parenta98c1692a6f98d73b38692131eebe7acce963299 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I6a27fd990895ff36b35d2de6278ca0416e6c00f7
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/file/filinl.hxx10
-rw-r--r--ucb/source/ucp/gio/gio_seekable.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/NeonUri.cxx6
3 files changed, 10 insertions, 10 deletions
diff --git a/ucb/source/ucp/file/filinl.hxx b/ucb/source/ucp/file/filinl.hxx
index 4ad0a6623961..b2db314516ce 100644
--- a/ucb/source/ucp/file/filinl.hxx
+++ b/ucb/source/ucp/file/filinl.hxx
@@ -45,23 +45,23 @@ inline const sal_Int16& SAL_CALL shell::MyProperty::getAttributes() const
}
inline void SAL_CALL shell::MyProperty::setHandle( const sal_Int32& __Handle ) const
{
- (( MyProperty* )this )->Handle = __Handle;
+ const_cast<MyProperty*>(this)->Handle = __Handle;
}
inline void SAL_CALL shell::MyProperty::setType( const com::sun::star::uno::Type& __Typ ) const
{
- (( MyProperty* )this )->Typ = __Typ;
+ const_cast<MyProperty*>(this)->Typ = __Typ;
}
inline void SAL_CALL shell::MyProperty::setValue( const com::sun::star::uno::Any& __Value ) const
{
- (( MyProperty* )this )->Value = __Value;
+ const_cast<MyProperty*>(this)->Value = __Value;
}
inline void SAL_CALL shell::MyProperty::setState( const com::sun::star::beans::PropertyState& __State ) const
{
- (( MyProperty* )this )->State = __State;
+ const_cast<MyProperty*>(this)->State = __State;
}
inline void SAL_CALL shell::MyProperty::setAttributes( const sal_Int16& __Attributes ) const
{
- (( MyProperty* )this )->Attributes = __Attributes;
+ const_cast<MyProperty*>(this)->Attributes = __Attributes;
}
diff --git a/ucb/source/ucp/gio/gio_seekable.cxx b/ucb/source/ucp/gio/gio_seekable.cxx
index 940375dbd4e9..ec326cfe545e 100644
--- a/ucb/source/ucp/gio/gio_seekable.cxx
+++ b/ucb/source/ucp/gio/gio_seekable.cxx
@@ -86,8 +86,8 @@ sal_Int64 SAL_CALL Seekable::getLength() throw( io::IOException, uno::RuntimeExc
sal_uInt64 nSize = 0;
GFileInfo* pInfo = G_IS_FILE_INPUT_STREAM(mpStream)
- ? g_file_input_stream_query_info(G_FILE_INPUT_STREAM(mpStream), const_cast<char*>(G_FILE_ATTRIBUTE_STANDARD_SIZE), NULL, NULL)
- : g_file_output_stream_query_info(G_FILE_OUTPUT_STREAM(mpStream), const_cast<char*>(G_FILE_ATTRIBUTE_STANDARD_SIZE), NULL, NULL);
+ ? g_file_input_stream_query_info(G_FILE_INPUT_STREAM(mpStream), G_FILE_ATTRIBUTE_STANDARD_SIZE, NULL, NULL)
+ : g_file_output_stream_query_info(G_FILE_OUTPUT_STREAM(mpStream), G_FILE_ATTRIBUTE_STANDARD_SIZE, NULL, NULL);
if (pInfo)
{
diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx
index d378cfb46ddf..596293199a20 100644
--- a/ucb/source/ucp/webdav-neon/NeonUri.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx
@@ -49,21 +49,21 @@ using namespace webdav_ucp;
namespace {
-const ne_uri g_sUriDefaultsHTTP = { (char *) "http",
+const ne_uri g_sUriDefaultsHTTP = { const_cast<char *>("http"),
NULL,
NULL,
DEFAULT_HTTP_PORT,
NULL,
NULL,
NULL };
-const ne_uri g_sUriDefaultsHTTPS = { (char *) "https",
+const ne_uri g_sUriDefaultsHTTPS = { const_cast<char *>("https"),
NULL,
NULL,
DEFAULT_HTTPS_PORT,
NULL,
NULL,
NULL };
-const ne_uri g_sUriDefaultsFTP = { (char *) "ftp",
+const ne_uri g_sUriDefaultsFTP = { const_cast<char *>("ftp"),
NULL,
NULL,
DEFAULT_FTP_PORT,