diff options
author | Guillem Jover <guillem@debian.org> | 2013-11-21 06:20:01 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-12-05 10:19:33 +0100 |
commit | 80cc83904a4cc04f1b7a4ebe0439fea25bbaaf74 (patch) | |
tree | ee1abb5c5b24fed494cbc1473af37e67e5c82322 /dselect/pkgdepcon.cc | |
parent | cf21cccb98bdb31a84bbe1aa1217c712b47aedd2 (diff) | |
download | dpkg-80cc83904a4cc04f1b7a4ebe0439fea25bbaaf74.tar.gz |
dselect: Use C++11 nullptr instead of 0 or NULL
It is way more descriptive, and has a better type. Check for C++11
compiler support and fallback nullptr to 0 if unavailable.
Diffstat (limited to 'dselect/pkgdepcon.cc')
-rw-r--r-- | dselect/pkgdepcon.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index 86428f029..39dab49cc 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -249,7 +249,7 @@ int packagelist::resolvedepcon(dependency *depends) { if (would_like_to_install(depends->up->clientdata->selected,depends->up) <= 0) return 0; - fixbyupgrade= 0; + fixbyupgrade = nullptr; possi = depends->list; while (possi && !deppossatisfied(possi, &fixbyupgrade)) @@ -277,7 +277,7 @@ int packagelist::resolvedepcon(dependency *depends) { this, depends, pkg_name(fixbyupgrade->pkg, pnaw_always)); best= fixbyupgrade; } else { - best= 0; + best = nullptr; for (possi= depends->list; possi; possi= possi->next) { @@ -343,7 +343,8 @@ int packagelist::resolvedepcon(dependency *depends) { "packagelist[%p]::resolvedepcon([%p]): conflict installing 1", this, depends); - if (!deppossatisfied(depends->list,0)) return 0; + if (!deppossatisfied(depends->list, nullptr)) + return 0; debug(dbg_depcon, "packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch", |