Make it a pointer since memory is allocated on heap
AbandonedPublic

Authored by shubham on May 16 2019, 7:56 PM.

Details

Diff Detail

Repository
R16 KPMCore
Branch
servicewatcher
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11884
Build 11902: arc lint + arc unit
shubham requested review of this revision.May 16 2019, 7:56 PM
shubham created this revision.
cjlcarvalho added inline comments.May 16 2019, 8:13 PM
src/util/externalcommandhelper.cpp
72

I don't think that this is truly a problem, since auto typing will make a type deduction that this is a pointer anyway.

shubham added inline comments.May 17 2019, 5:18 AM
src/util/externalcommandhelper.cpp
72

Agreed, but people relate new keyword with a pointer and also it is done like this on all the other places in code.

Well, in principle both mean exactly the same thing, so I don't have strong opinion on this. I probably use them interchangeably anyway. Well, it's auto, so we don't care what type it is... So based on that I would say no need to make a commit. Other parts of KDE codebase also don't have unified style here. Just checked kwin, it has both auto and auto *

Just note that e.g. in ranged based for loop we usually want for (const auto & a : ... ). There const and & actually make a difference unlike here.

shubham abandoned this revision.May 17 2019, 5:55 PM

I assume it is not required anymore.