Skip to content

Commit

Permalink
Don't compare to nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Dec 9, 2024
1 parent 4dee9ec commit 79f41e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Lcio2EDM4hepTool::Lcio2EDM4hepTool(const std::string& type, const std::string& n

StatusCode Lcio2EDM4hepTool::initialize() {
m_podioDataSvc = dynamic_cast<PodioDataSvc*>(m_eds.get());
if (nullptr == m_podioDataSvc)
if (!m_podioDataSvc)
return StatusCode::FAILURE;

return AlgTool::initialize();
Expand All @@ -74,7 +74,7 @@ bool Lcio2EDM4hepTool::collectionExist(const std::string& collection_name) {
void Lcio2EDM4hepTool::registerCollection(
std::tuple<const std::string&, std::unique_ptr<podio::CollectionBase>> namedColl, EVENT::LCCollection* lcioColl) {
auto& [name, e4hColl] = namedColl;
if (e4hColl == nullptr) {
if (!e4hColl) {
error() << "Could not convert collection " << name << endmsg;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion k4MarlinWrapper/src/components/LcioEventAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ StatusCode LcioEvent::initialize() {
StatusCode LcioEvent::execute(const EventContext&) const {
auto theEvent = m_reader->readNextEvent(EVENT::LCIO::UPDATE);

if (theEvent == nullptr) {
if (!theEvent) {
// Store flag to indicate there was NOT a LCEvent
auto pStatus = std::make_unique<LCEventWrapperStatus>(false);
const StatusCode scStatus = eventSvc()->registerObject("/Event/LCEventStatus", pStatus.release());
Expand Down
2 changes: 1 addition & 1 deletion k4MarlinWrapper/src/components/MarlinProcessorWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ StatusCode MarlinProcessorWrapper::loadProcessorLibraries() const {
// Load all libraries from the marlin_dll
info() << "looking for marlindll" << endmsg;
const char* const marlin_dll = getenv("MARLIN_DLL");
if (marlin_dll == nullptr) {
if (!marlin_dll) {
warning() << "MARLIN_DLL not set, not loading any processors " << endmsg;
} else {
info() << "Found marlin_dll " << marlin_dll << endmsg;
Expand Down

0 comments on commit 79f41e3

Please sign in to comment.