UpdateQueue: use std::string and std::queue

This commit is contained in:
Max Kellermann
2013-10-17 21:13:40 +02:00
parent 196ec25682
commit 7ef40de98b
3 changed files with 35 additions and 40 deletions

View File

@@ -22,10 +22,25 @@
#include "check.h"
#include <string>
struct UpdateQueueItem {
std::string path_utf8;
bool discard;
UpdateQueueItem() = default;
UpdateQueueItem(const char *_path, bool _discard)
:path_utf8(_path), discard(_discard) {}
bool IsDefined() const {
return !path_utf8.empty();
}
};
unsigned
update_queue_push(const char *path, bool discard, unsigned base);
char *
update_queue_shift(bool *discard_r);
UpdateQueueItem
update_queue_shift();
#endif