Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Thumbnailers
Commits
0fb6474a
Commit
0fb6474a
authored
Jul 19, 2022
by
Nicolas Fella
Browse files
Port from auto_ptr to unique_ptr
parent
16460214
Changes
3
Hide whitespace changes
Inline
Side-by-side
ps/dscparse_adapter.cpp
View file @
0fb6474a
...
...
@@ -282,20 +282,20 @@ const CDSCMEDIA* KDSC::page_media() const
return
_cdsc
->
page_media
;
}
auto
_ptr
<
KDSCBBOX
>
KDSC
::
bbox
()
const
std
::
unique
_ptr
<
KDSCBBOX
>
KDSC
::
bbox
()
const
{
if
(
_cdsc
->
bbox
==
nullptr
)
return
auto_ptr
<
KDSCBBOX
>
(
nullptr
)
;
return
nullptr
;
else
return
auto_ptr
<
KDSCBBOX
>
(
new
KDSCBBOX
(
*
_cdsc
->
bbox
)
);
return
std
::
make_unique
<
KDSCBBOX
>
(
*
_cdsc
->
bbox
);
}
auto
_ptr
<
KDSCBBOX
>
KDSC
::
page_bbox
()
const
std
::
unique
_ptr
<
KDSCBBOX
>
KDSC
::
page_bbox
()
const
{
if
(
_cdsc
->
page_bbox
==
nullptr
)
return
auto_ptr
<
KDSCBBOX
>
(
nullptr
)
;
return
nullptr
;
else
return
auto_ptr
<
KDSCBBOX
>
(
new
KDSCBBOX
(
*
_cdsc
->
page_bbox
)
);
return
std
::
make_unique
<
KDSCBBOX
>
(
*
_cdsc
->
page_bbox
);
}
QString
KDSC
::
dsc_title
()
const
...
...
ps/dscparse_adapter.h
View file @
0fb6474a
...
...
@@ -264,13 +264,8 @@ public:
CDSCMEDIA
**
media
()
const
;
const
CDSCMEDIA
*
page_media
()
const
;
#if defined(__GNUC__) && (__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93))
auto_ptr
<
KDSCBBOX
>
bbox
()
const
;
auto_ptr
<
KDSCBBOX
>
page_bbox
()
const
;
#else
std
::
auto_ptr
<
KDSCBBOX
>
bbox
()
const
;
std
::
auto_ptr
<
KDSCBBOX
>
page_bbox
()
const
;
#endif
std
::
unique_ptr
<
KDSCBBOX
>
bbox
()
const
;
std
::
unique_ptr
<
KDSCBBOX
>
page_bbox
()
const
;
// CDSCDOSEPS *doseps;
...
...
ps/gscreator.cpp
View file @
0fb6474a
...
...
@@ -231,7 +231,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
}
}
std
::
auto
_ptr
<
KDSCBBOX
>
bbox
=
dsc
.
bbox
();
std
::
unique
_ptr
<
KDSCBBOX
>
bbox
=
dsc
.
bbox
();
const
bool
is_encapsulated
=
no_dvi
&&
(
path
.
endsWith
(
QLatin1String
(
".eps"
),
Qt
::
CaseInsensitive
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment