[PATCH 4/6] apitrace trim: remove unnecessary assignment in CallSet::merge()

Lawrence L Love lawlove at gmail.com
Fri Oct 11 15:05:57 PDT 2013


This is re-initializing the object the first time merge is called.
But the first time merge is called it has already been intiialized.
This assignment was made to preserve sequence of calls prior to:

 commit 8bf25078bba9deedcfd5d42fa3739bdd758a560e
 apitrace: Allow comma separated lists in --calls and --frames options

when the merge() member function was added to the CallSet class but
is unnecessary

Remove the check and re-initialization of the object if it's empty

Signed-off-by: Lawrence L Love <lawrencex.l.love at intel.com>
---
 common/trace_callset.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/common/trace_callset.cpp b/common/trace_callset.cpp
index 1d50720..e7efcda 100644
--- a/common/trace_callset.cpp
+++ b/common/trace_callset.cpp
@@ -237,10 +237,6 @@ CallSet::CallSet(CallFlags freq): limits(std::numeric_limits<CallNo>::min(), std
 void
 CallSet::merge(const char *string)
 {
-    if (empty()) {
-       *this = CallSet();
-    }
-
     /*
      * Parse a comma-separated list of files or ranges
      */
-- 
1.8.4.rc3



More information about the apitrace mailing list