Skip to content

Commit

Permalink
logd: logtimes switch to std::list
Browse files Browse the repository at this point in the history
(cherry pick from commit 98dca2d)

Bug: 23350706
Change-Id: Icc60dd06119ea20a22610644ff880d5135363aba
  • Loading branch information
Mark Salyzyn committed Aug 20, 2015
1 parent edc6f52 commit a68a516
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion logd/FlushCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void FlushCommand::runSocketCommand(SocketClient *client) {
return;
}
entry = new LogTimeEntry(mReader, client, mNonBlock, mTail, mLogMask, mPid, mStart);
times.push_back(entry);
times.push_front(entry);
}

client->incRef();
Expand Down
8 changes: 5 additions & 3 deletions logd/LogTimes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#include <pthread.h>
#include <time.h>
#include <sys/types.h>

#include <list>

#include <sysutils/SocketClient.h>
#include <utils/List.h>
#include <log/log.h>

class LogReader;
Expand Down Expand Up @@ -107,6 +109,6 @@ class LogTimeEntry {
static int FilterSecondPass(const LogBufferElement *element, void *me);
};

typedef android::List<LogTimeEntry *> LastLogTimes;
typedef std::list<LogTimeEntry *> LastLogTimes;

#endif
#endif // _LOGD_LOG_TIMES_H__

0 comments on commit a68a516

Please sign in to comment.