broulik added a comment.
Screenshot? :) INLINE COMMENTS > ProcessModel.cpp:804 > + * didn't change though. */ > + if(mMapProcessCPUHistory.contains(process)) { > + auto &history = mMapProcessCPUHistory[process]; Use `find()` to avoid double lookup (contains+operator[]) > ProcessModel.cpp:808 > + // Only add an entry if the latest one is older than MIN_HIST_AGE > + if(!history.size() || timestamp - history.constLast().timestamp > > MIN_HIST_AGE) { > + if(history.size() == MAX_HIST_ENTRIES) `isEmpty()` > ProcessModel.cpp:809 > + if(!history.size() || timestamp - history.constLast().timestamp > > MIN_HIST_AGE) { > + if(history.size() == MAX_HIST_ENTRIES) > + history.removeFirst(); Braces also for one-line statements REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D9689 To: fvogt, #plasma Cc: broulik, ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart