fix coding conventions.

This commit is contained in:
olivier80 2017-02-05 23:18:12 +01:00
parent 61a1ab27dd
commit 74b1f38715

View File

@ -3877,33 +3877,29 @@ struct ArgJoin
ArgJoin(It first, It last, const BasicCStringRef<Char>& sep) :
first(first),
last(last),
sep(sep)
{
}
sep(sep) {}
};
template <typename It>
ArgJoin<char, It> join(It first, It last, const BasicCStringRef<char>& sep)
{
ArgJoin<char, It> join(It first, It last, const BasicCStringRef<char>& sep) {
return ArgJoin<char, It>(first, last, sep);
}
template <typename It>
ArgJoin<wchar_t, It> join(It first, It last, const BasicCStringRef<wchar_t>& sep)
{
ArgJoin<wchar_t, It> join(It first, It last, const BasicCStringRef<wchar_t>& sep) {
return ArgJoin<wchar_t, It>(first, last, sep);
}
#if FMT_HAS_GXX_CXX11
template <typename Range>
auto join(const Range& range, const BasicCStringRef<char>& sep) -> ArgJoin<char, decltype(std::begin(range))>
{
auto join(const Range& range, const BasicCStringRef<char>& sep)
-> ArgJoin<char, decltype(std::begin(range))> {
return join(std::begin(range), std::end(range), sep);
}
template <typename Range>
auto join(const Range& range, const BasicCStringRef<wchar_t>& sep) -> ArgJoin<wchar_t, decltype(std::begin(range))>
{
auto join(const Range& range, const BasicCStringRef<wchar_t>& sep)
-> ArgJoin<wchar_t, decltype(std::begin(range))> {
return join(std::begin(range), std::end(range), sep);
}
#endif
@ -3921,12 +3917,10 @@ void format_arg(fmt::BasicFormatter<Char, ArgFormatter> &f,
FMT_THROW(FormatError("missing '}' in format string"));
It it = e.first;
if (it != e.last)
{
if (it != e.last) {
const Char* save = format_str;
f.format(format_str, internal::MakeArg<fmt::BasicFormatter<Char, ArgFormatter> >(*it++));
while (it != e.last)
{
while (it != e.last) {
f.writer().write(e.sep);
format_str = save;
f.format(format_str, internal::MakeArg<fmt::BasicFormatter<Char, ArgFormatter> >(*it++));