Skip to content

Commit

Permalink
[modernization] Resolved megalinter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanAlling-DojoFive committed Jan 28, 2023
1 parent 024d02e commit bf343d7
Show file tree
Hide file tree
Showing 157 changed files with 503 additions and 506 deletions.
2 changes: 1 addition & 1 deletion srec_cat/arglex3.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class srec_cat_arglex3:
srec_cat_arglex3(const srec_cat_arglex3 &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
srec_cat_arglex3 &operator=(const srec_cat_arglex3 &) = delete;

Expand Down
2 changes: 1 addition & 1 deletion srecord/arglex.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,4 @@ class arglex

};

#endif // LIB_ARGLEX_H
#endif // LIB_ARGLEX_H
6 changes: 3 additions & 3 deletions srecord/arglex/tool.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,17 +464,17 @@ class arglex_tool:
defcon_t contradictory_bytes;

/**
* The default constructor. Do not use.
* The default constructor.
*/
arglex_tool() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
arglex_tool(const arglex_tool &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
arglex_tool &operator=(const arglex_tool &) = delete;

Expand Down
32 changes: 16 additions & 16 deletions srecord/arglex/tool/get_interval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ srecord::arglex_tool::get_interval_factor(const char *name)
return retval;
}

case token_within:
{
token_next();
srecord::input::pointer ifp = get_input();
interval result = srecord::input_interval(ifp);
return result;
}

case token_over:
{
token_next();
srecord::input::pointer ifp = get_input();
interval result = srecord::input_interval(ifp);
return result.flatten();
}

default:
{
if (!can_get_number())
Expand Down Expand Up @@ -78,22 +94,6 @@ srecord::arglex_tool::get_interval_factor(const char *name)
interval result(n1, n2);
return result;
}

case token_within:
{
token_next();
srecord::input::pointer ifp = get_input();
interval result = srecord::input_interval(ifp);
return result;
}

case token_over:
{
token_next();
srecord::input::pointer ifp = get_input();
interval result = srecord::input_interval(ifp);
return result.flatten();
}
}
}

Expand Down
11 changes: 3 additions & 8 deletions srecord/arglex/tool/input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ srecord::arglex_tool::get_simple_input()
case token_paren_begin:
{
token_next();
input::pointer ifp = get_input();
input::pointer ifp_local = get_input();
for (;;)
{
switch (token_cur())
Expand All @@ -216,12 +216,12 @@ srecord::arglex_tool::get_simple_input()
case arglex_tool::token_string:
case arglex_tool::token_stdio:
case arglex_tool::token_generator:
ifp = input_catenate::create(ifp, get_input());
ifp_local = input_catenate::create(ifp_local, get_input());
break;

case token_paren_end:
token_next();
return ifp;
return ifp_local;

default:
fatal_error
Expand All @@ -238,7 +238,6 @@ srecord::arglex_tool::get_simple_input()
token_next();
ifp = input_generator::create(this);
return ifp;
break;

case token_string:
fn = value_string();
Expand Down Expand Up @@ -270,9 +269,6 @@ srecord::arglex_tool::get_simple_input()
{
case token_motorola:
token_next();
// fall through...

default:
ifp = input_file_motorola::create(fn);
break;

Expand Down Expand Up @@ -484,7 +480,6 @@ srecord::arglex_tool::get_simple_input()
ifp = input_file_wilson::create(fn);
break;
}
// assert(ifp);

//
// Process any additional format-specific command line options.
Expand Down
4 changes: 2 additions & 2 deletions srecord/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ class input

private:
/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input(const input &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input &operator=(const input &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/catenate.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ class input_catenate:
pointer in2;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_catenate() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_catenate(const input_catenate &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_catenate &operator=(const input_catenate &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,17 @@ class input_file:
void *get_fp();

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file(const input_file &) = delete;

/**
* the assignment operator. Do not use.
* the assignment operator.
*/
input_file &operator=(const input_file &) = delete;
};
Expand Down
2 changes: 1 addition & 1 deletion srecord/input/file/aomf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ srecord::input_file_aomf::~input_file_aomf()

srecord::input_file_aomf::input_file_aomf(const std::string &a_filename) :
srecord::input_file(a_filename)

{
}

Expand Down
4 changes: 2 additions & 2 deletions srecord/input/file/aomf.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ class input_file_aomf:
int slurp();

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_aomf(const input_file_aomf &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_aomf &operator=(const input_file_aomf &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file/ascii_hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ class input_file_ascii_hex:
enum { state_initial, state_body, state_ignore } state;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_ascii_hex() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_ascii_hex(const input_file_ascii_hex &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_ascii_hex &operator=(const input_file_ascii_hex &) = delete;
};
Expand Down
9 changes: 5 additions & 4 deletions srecord/input/file/atmel_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,20 @@ class input_file_atmel_generic:
endian_t end;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_atmel_generic() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_atmel_generic(const input_file_atmel_generic &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_atmel_generic &operator=(const input_file_atmel_generic &) = delete;
input_file_atmel_generic &operator=(
const input_file_atmel_generic &) = delete;
};

};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file/binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ class input_file_binary:
bool is_binary() const override;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_binary() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_binary(const input_file_binary &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_binary &operator=(const input_file_binary &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file/brecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ class input_file_brecord:
bool seen_some_input;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_brecord() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_brecord(const input_file_brecord &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_brecord &operator=(const input_file_brecord &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file/cosmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ class input_file_cosmac:
bool seen_some_input;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_cosmac() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_cosmac(const input_file_cosmac &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_cosmac &operator=(const input_file_cosmac &) = delete;
};
Expand Down
2 changes: 1 addition & 1 deletion srecord/input/file/dec_binary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
srecord::input_file_dec_binary::input_file_dec_binary(
const std::string &a_file_name) :
srecord::input_file(a_file_name)

{
}

Expand Down
4 changes: 2 additions & 2 deletions srecord/input/file/dec_binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ class input_file_dec_binary:
unsigned long current_address{0};

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_dec_binary(const input_file_dec_binary &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_dec_binary &operator=(const input_file_dec_binary &) = delete;
};
Expand Down
6 changes: 3 additions & 3 deletions srecord/input/file/emon52.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ class input_file_emon52:
void skip_white_space();

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_emon52() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_emon52(const input_file_emon52 &) = delete;

/**
* The assignment operator. Do not use.
* The assignment operator.
*/
input_file_emon52 &operator=(const input_file_emon52 &) = delete;
};
Expand Down
4 changes: 2 additions & 2 deletions srecord/input/file/fairchild.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ class input_file_fairchild:
bool file_contains_data;

/**
* The default constructor. Do not use.
* The default constructor.
*/
input_file_fairchild() = delete;

/**
* The copy constructor. Do not use.
* The copy constructor.
*/
input_file_fairchild(const input_file_fairchild &) = delete;

Expand Down
Loading

0 comments on commit bf343d7

Please sign in to comment.