mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-05 20:41:06 +00:00
Use FMT_DISALLOW_COPY_AND_ASSIGN instead of undefined assignment operators
This commit is contained in:
parent
0fea89ec8f
commit
6f3c095ed6
15
format.cc
15
format.cc
@ -240,10 +240,10 @@ void check_sign(const Char *&s, const Arg &arg) {
|
||||
// left alignment if it is negative.
|
||||
class WidthHandler : public fmt::internal::ArgVisitor<WidthHandler, unsigned> {
|
||||
private:
|
||||
WidthHandler& operator=(WidthHandler const&); //no impl
|
||||
|
||||
fmt::FormatSpec &spec_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler);
|
||||
|
||||
public:
|
||||
explicit WidthHandler(fmt::FormatSpec &spec) : spec_(spec) {}
|
||||
|
||||
@ -286,11 +286,11 @@ class PrecisionHandler :
|
||||
template <typename T>
|
||||
class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {
|
||||
private:
|
||||
ArgConverter& operator=(ArgConverter const&); //no impl
|
||||
|
||||
fmt::internal::Arg &arg_;
|
||||
wchar_t type_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter);
|
||||
|
||||
public:
|
||||
ArgConverter(fmt::internal::Arg &arg, wchar_t type)
|
||||
: arg_(arg), type_(type) {}
|
||||
@ -326,9 +326,10 @@ class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {
|
||||
// Converts an integer argument to char for printf.
|
||||
class CharConverter : public fmt::internal::ArgVisitor<CharConverter, void> {
|
||||
private:
|
||||
CharConverter& operator=(CharConverter const&); // no impl
|
||||
fmt::internal::Arg &arg_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter);
|
||||
|
||||
public:
|
||||
explicit CharConverter(fmt::internal::Arg &arg) : arg_(arg) {}
|
||||
|
||||
@ -531,13 +532,13 @@ template <typename Char>
|
||||
class fmt::internal::ArgFormatter :
|
||||
public fmt::internal::ArgVisitor<fmt::internal::ArgFormatter<Char>, void> {
|
||||
private:
|
||||
ArgFormatter& operator=(ArgFormatter const&); // no impl
|
||||
|
||||
fmt::BasicFormatter<Char> &formatter_;
|
||||
fmt::BasicWriter<Char> &writer_;
|
||||
fmt::FormatSpec &spec_;
|
||||
const Char *format_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(ArgFormatter);
|
||||
|
||||
public:
|
||||
ArgFormatter(
|
||||
fmt::BasicFormatter<Char> &f,fmt::FormatSpec &s, const Char *fmt)
|
||||
|
4
format.h
4
format.h
@ -991,10 +991,10 @@ class PrintfFormatter : private FormatterBase {
|
||||
template <typename Char>
|
||||
class BasicFormatter : private internal::FormatterBase {
|
||||
private:
|
||||
BasicFormatter& operator=(BasicFormatter const&); // no impl
|
||||
|
||||
BasicWriter<Char> &writer_;
|
||||
const Char *start_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(BasicFormatter);
|
||||
|
||||
// Parses argument index and returns corresponding argument.
|
||||
internal::Arg parse_arg_index(const Char *&s);
|
||||
|
Loading…
Reference in New Issue
Block a user