Project

General

Profile

Actions

Feature #199

open

replace C style casts by C++ casts if available

Added by Marco Eichelberg about 22 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Module:
all
Operating System:
Compiler:

Description

Locate all typecasts in dcmtk, determine appropriate new-style cast,
replace by new-style cast.

By default all casts should be replaced by static_cast or const_cast
(to cast away a const qualifier). Only in rare cases,
reinterpret_cast should be necessary (if static_cast is refused by
the compiler). dynamic_cast requires RTTI and should, in general,
not be needed by DCMTK.

Advantages: * better documentation (which cast is intended for which purpose) * easier to locate in source code * safer

When compiling the toolkit with gcc -Wold-style-cast,
a warning is generated for C style cast.

No data to display

Actions

Also available in: Atom PDF