db/update: convert runtime check to assertion
This commit is contained in:
parent
c310941f69
commit
04b4f53488
|
@ -20,7 +20,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "Service.hxx"
|
#include "Service.hxx"
|
||||||
#include "UpdateDomain.hxx"
|
#include "UpdateDomain.hxx"
|
||||||
#include "Mapper.hxx"
|
|
||||||
#include "db/DatabaseSimple.hxx"
|
#include "db/DatabaseSimple.hxx"
|
||||||
#include "Idle.hxx"
|
#include "Idle.hxx"
|
||||||
#include "util/Error.hxx"
|
#include "util/Error.hxx"
|
||||||
|
@ -102,9 +101,6 @@ UpdateService::Enqueue(const char *path, bool discard)
|
||||||
{
|
{
|
||||||
assert(main_thread.IsInside());
|
assert(main_thread.IsInside());
|
||||||
|
|
||||||
if (!db_is_simple() || !mapper_has_music_directory())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (progress != UPDATE_PROGRESS_IDLE) {
|
if (progress != UPDATE_PROGRESS_IDLE) {
|
||||||
const unsigned id = GenerateId();
|
const unsigned id = GenerateId();
|
||||||
if (!queue.Push(path, discard, id))
|
if (!queue.Push(path, discard, id))
|
||||||
|
@ -152,4 +148,5 @@ UpdateService::RunDeferred()
|
||||||
UpdateService::UpdateService(EventLoop &_loop)
|
UpdateService::UpdateService(EventLoop &_loop)
|
||||||
:DeferredMonitor(_loop), walk(_loop)
|
:DeferredMonitor(_loop), walk(_loop)
|
||||||
{
|
{
|
||||||
|
assert(db_is_simple());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue