Beispiel #1
0
	[[nodiscard]]
	inline size_t read(std::istream& Stream, const range<char*>& Buffer)
	{
		{
			const auto Exceptions = Stream.exceptions();
			Stream.exceptions(Exceptions & ~(Stream.failbit | Stream.eofbit));
			SCOPE_EXIT{ Stream.exceptions(Exceptions); };

			Stream.read(Buffer.data(), Buffer.size());
			if (!Stream.bad() && Stream.eof())
				Stream.clear();
		}

		return Stream.gcount();
	}
Beispiel #2
0
void DialogBuilder::AddButtons(range<const lng*> const Buttons, size_t const OkIndex, size_t const CancelIndex)
{
	base::AddButtons(static_cast<int>(Buttons.size()), reinterpret_cast<const int*>(Buttons.data()), static_cast<int>(OkIndex), static_cast<int>(CancelIndex));
}