diff options
Diffstat (limited to '')
-rw-r--r-- | src/util/LazyRandomEngine.cxx (renamed from src/inotify_queue.h) | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/inotify_queue.h b/src/util/LazyRandomEngine.cxx index cfc28ebfe..0f90ebb2e 100644 --- a/src/inotify_queue.h +++ b/src/util/LazyRandomEngine.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,16 +17,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_INOTIFY_QUEUE_H -#define MPD_INOTIFY_QUEUE_H +#include "config.h" +#include "LazyRandomEngine.hxx" void -mpd_inotify_queue_init(void); +LazyRandomEngine::AutoCreate() +{ + if (engine != nullptr) + return; -void -mpd_inotify_queue_finish(void); - -void -mpd_inotify_enqueue(char *uri_utf8); - -#endif + std::random_device rd; + engine = new std::mt19937(rd()); +} |