Kaydet (Commit) 0c141f2e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

const_cast: convert some C-style casts and remove some redundant ones

Change-Id: I6a27fd990895ff36b35d2de6278ca0416e6c00f7
üst a98c1692
......@@ -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;
}
......
......@@ -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)
{
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment