/*
 * Copyright © 2021-2026 Pierrick Caillon <pierrick.caillon+zipdirfs@megami.fr>
 */
#include "ZipDirFs/Components/ChangedProxy.h"

namespace ZipDirFs::Components
{
	ChangedProxy::ChangedProxy(std::unique_ptr<Changed>&& changed) :
		changed(std::move(changed))
	{
	}

	bool ChangedProxy::operator()() { return (*changed)(); }

	ChangedProxy::operator FileTime() const { return *changed; }

	void ChangedProxy::swap(std::unique_ptr<Changed>& other)
	{
		changed.swap(other);
	}
} // namespace ZipDirFs::Components
