Skip to content

Commit

Permalink
All - Fully-qualify references to std::move
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Feb 1, 2025
1 parent aa9bb3b commit a44e878
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 58 deletions.
6 changes: 3 additions & 3 deletions src/ast/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ Static Static::clone() const

Function::Function(Span sp, ::std::string abi, Flags flags, GenericParams params, TypeRef ret_type, Arglist args, bool is_variadic):
m_span(sp),
m_params( move(params) ),
m_rettype( move(ret_type) ),
m_args( move(args) ),
m_params( mv$(params) ),
m_rettype( mv$(ret_type) ),
m_args( mv$(args) ),
m_is_variadic(is_variadic),
m_abi( mv$(abi) ),
m_flags(flags)
Expand Down
26 changes: 13 additions & 13 deletions src/ast/ast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class TypeAlias

//TypeAlias() {}
TypeAlias(GenericParams params, TypeRef type):
m_params( move(params) ),
m_type( move(type) )
m_params( std::move(params) ),
m_type( std::move(type) )
{}
static TypeAlias new_associated_type(GenericParams params, GenericParams type_bounds, TypeRef default_type) {
TypeAlias rv { std::move(params), std::move(default_type) };
Expand Down Expand Up @@ -164,8 +164,8 @@ class Static

Static(Class s_class, TypeRef type, Expr value):
m_class(s_class),
m_type( move(type) ),
m_value( move(value) )
m_type( std::move(type) ),
m_value( std::move(value) )
{}

const Class& s_class() const { return m_class; }
Expand Down Expand Up @@ -420,9 +420,9 @@ class Enum
} m_markings;

Enum() {}
Enum( GenericParams params, ::std::vector<EnumVariant> variants ):
m_params( move(params) ),
m_variants( move(variants) )
Enum( GenericParams params, ::std::vector<EnumVariant> variants )
: m_params( ::std::move(params) )
, m_variants( ::std::move(variants) )
{}

const GenericParams& params() const { return m_params; }
Expand Down Expand Up @@ -478,16 +478,16 @@ class Struct

Struct() {}
Struct(GenericParams params):
m_params( mv$(params) ),
m_params( ::std::move(params) ),
m_data( StructData::make_Unit({}) )
{
}
Struct( GenericParams params, ::std::vector<StructItem> fields ):
m_params( move(params) ),
m_params( ::std::move(params) ),
m_data( StructData::make_Struct({mv$(fields)}) )
{}
Struct( GenericParams params, ::std::vector<TupleItem> fields ):
m_params( move(params) ),
m_params( ::std::move(params) ),
m_data( StructData::make_Tuple({mv$(fields)}) )
{}

Expand All @@ -510,9 +510,9 @@ class Union
} repr = Repr::Rust;
} m_markings;

Union( GenericParams params, ::std::vector<StructItem> fields ):
m_params( move(params) ),
m_variants( mv$(fields) )
Union( GenericParams params, ::std::vector<StructItem> fields )
: m_params( ::std::move(params) )
, m_variants( ::std::move(fields) )
{}

const GenericParams& params() const { return m_params; }
Expand Down
74 changes: 37 additions & 37 deletions src/ast/expr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ struct ExprNode_Block:
m_yields_final_value(true),
m_label(""),
m_local_mod(),
m_nodes( mv$(nodes) )
m_nodes( ::std::move(nodes) )
{}
ExprNode_Block(Type type, bool yields_final_value, ::std::vector<ExprNodeP> nodes, ::std::shared_ptr<AST::Module> local_mod):
m_block_type(type),
m_yields_final_value(yields_final_value),
m_label(""),
m_local_mod( move(local_mod) ),
m_nodes( move(nodes) )
m_local_mod( ::std::move(local_mod) ),
m_nodes( ::std::move(nodes) )
{
}

Expand All @@ -90,7 +90,7 @@ struct ExprNode_Try:
ExprNodeP m_inner;

ExprNode_Try(ExprNodeP inner):
m_inner(mv$(inner))
m_inner( ::std::move(inner) )
{
}

Expand All @@ -106,9 +106,9 @@ struct ExprNode_Macro:
bool m_is_braced;

ExprNode_Macro(AST::Path name, RcString ident, ::TokenTree&& tokens, bool is_braced=false):
m_path( move(name) ),
m_path( ::std::move(name) ),
m_ident(ident),
m_tokens( move(tokens) )
m_tokens( ::std::move(tokens) )
, m_is_braced(is_braced)
{}

Expand All @@ -132,11 +132,11 @@ struct ExprNode_Asm:
::std::vector<::std::string> m_flags;

ExprNode_Asm(::std::string text, ::std::vector<ValRef> output, ::std::vector<ValRef> input, ::std::vector<::std::string> clobbers, ::std::vector<::std::string> flags):
m_text( move(text) ),
m_output( move(output) ),
m_input( move(input) ),
m_clobbers( move(clobbers) ),
m_flags( move(flags) )
m_text( ::std::move(text) ),
m_output( ::std::move(output) ),
m_input( ::std::move(input) ),
m_clobbers( ::std::move(clobbers) ),
m_flags( ::std::move(flags) )
{
}

Expand Down Expand Up @@ -169,8 +169,8 @@ struct ExprNode_Asm2:

ExprNode_Asm2(AsmCommon::Options options, std::vector<AsmCommon::Line> lines, std::vector<Param> params)
: m_options(options)
, m_lines( move(lines) )
, m_params( move(params) )
, m_lines( ::std::move(lines) )
, m_params( ::std::move(params) )
{
}

Expand All @@ -194,8 +194,8 @@ struct ExprNode_Flow:

ExprNode_Flow(Type type, Ident target, ExprNodeP value):
m_type(type),
m_target( move(target) ),
m_value( move(value) )
m_target( ::std::move(target) ),
m_value( ::std::move(value) )
{
}

Expand All @@ -212,10 +212,10 @@ struct ExprNode_LetBinding:
::std::pair<unsigned,unsigned> m_letelse_slots;

ExprNode_LetBinding(Pattern pat, TypeRef type, ExprNodeP value, ExprNodeP else_arm={})
: m_pat( move(pat) )
, m_type( move(type) )
, m_value( move(value) )
, m_else( move(else_arm) )
: m_pat( ::std::move(pat) )
, m_type( ::std::move(type) )
, m_value( ::std::move(value) )
, m_else( ::std::move(else_arm) )
{
}

Expand All @@ -237,8 +237,8 @@ struct ExprNode_Assign:
ExprNode_Assign(): m_op(NONE) {}
ExprNode_Assign(Operation op, ExprNodeP slot, ExprNodeP value):
m_op(op),
m_slot( move(slot) ),
m_value( move(value) )
m_slot( ::std::move(slot) ),
m_value( ::std::move(value) )
{
}

Expand All @@ -251,8 +251,8 @@ struct ExprNode_CallPath:
::std::vector<ExprNodeP> m_args;

ExprNode_CallPath(Path&& path, ::std::vector<ExprNodeP>&& args):
m_path( move(path) ),
m_args( move(args) )
m_path( ::std::move(path) ),
m_args( ::std::move(args) )
{
}

Expand All @@ -266,9 +266,9 @@ struct ExprNode_CallMethod:
::std::vector<ExprNodeP> m_args;

ExprNode_CallMethod(ExprNodeP obj, PathNode method, ::std::vector<ExprNodeP> args):
m_val( move(obj) ),
m_method( move(method) ),
m_args( move(args) )
m_val( ::std::move(obj) ),
m_method( ::std::move(method) ),
m_args( ::std::move(args) )
{
}

Expand All @@ -282,8 +282,8 @@ struct ExprNode_CallObject:
::std::vector<ExprNodeP> m_args;

ExprNode_CallObject(ExprNodeP val, ::std::vector< ExprNodeP >&& args):
m_val( move(val) ),
m_args( move(args) )
m_val( ::std::move(val) ),
m_args( ::std::move(args) )
{
}
NODE_METHODS();
Expand Down Expand Up @@ -531,9 +531,9 @@ struct ExprNode_StructLiteral:
t_values m_values;

ExprNode_StructLiteral(Path path, ExprNodeP base_value, t_values&& values ):
m_path( move(path) ),
m_base_value( move(base_value) ),
m_values( move(values) )
m_path( std::move(path) ),
m_base_value( std::move(base_value) ),
m_values( std::move(values) )
{}

NODE_METHODS();
Expand All @@ -548,8 +548,8 @@ struct ExprNode_StructLiteralPattern:
t_values m_values;

ExprNode_StructLiteralPattern(Path path, t_values&& values)
: m_path( move(path) )
, m_values( move(values) )
: m_path( std::move(path) )
, m_values( std::move(values) )
{}

NODE_METHODS();
Expand Down Expand Up @@ -646,8 +646,8 @@ struct ExprNode_Cast:
TypeRef m_type;

ExprNode_Cast(ExprNodeP value, TypeRef&& dst_type):
m_value( move(value) ),
m_type( move(dst_type) )
m_value( ::std::move(value) ),
m_type( ::std::move(dst_type) )
{
}
NODE_METHODS();
Expand All @@ -661,8 +661,8 @@ struct ExprNode_TypeAnnotation:
TypeRef m_type;

ExprNode_TypeAnnotation(ExprNodeP value, TypeRef&& dst_type):
m_value( move(value) ),
m_type( move(dst_type) )
m_value( ::std::move(value) ),
m_type( ::std::move(dst_type) )
{
}
NODE_METHODS();
Expand Down
4 changes: 2 additions & 2 deletions src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#endif

#define FMT(ss) (static_cast<::std::ostringstream&&>(::std::ostringstream() << ss).str())
// XXX: Evil hack - Define 'mv$' to be ::std::move
#define mv$ ::std::move
// XXX: Evil hack - Define 'mv$' to be ::std::move, so there's a shorter name for it
#define mv$(...) ::std::move(__VA_ARGS__)
#define box$(...) ::make_unique_ptr(::std::move(__VA_ARGS__))
#define rc_new$(...) ::make_shared_ptr(::std::move(__VA_ARGS__))

Expand Down
4 changes: 2 additions & 2 deletions src/hir/expr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ struct ExprNode_Asm2:
ExprNode_Asm2(Span sp, AsmCommon::Options options, std::vector<AsmCommon::Line> lines, std::vector<Param> params)
: ExprNode(mv$(sp))
, m_options(options)
, m_lines( move(lines) )
, m_params( move(params) )
, m_lines( ::std::move(lines) )
, m_params( ::std::move(params) )
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/macro_rules/macro_rules.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct MacroPatEnt
name( op ),
name_index(index),
tok( mv$(sep) ),
subpats( move(ents) ),
subpats( mv$(ents) ),
type(PAT_LOOP)
{
}
Expand Down

0 comments on commit a44e878

Please sign in to comment.