Skip to content

Commit

Permalink
fixed errors detected by Codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
fktn-k committed Oct 20, 2023
1 parent 1239e69 commit 3d24ee8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion include/fkYAML/detail/input/deserializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ class basic_deserializer
BasicNodeType* m_current_node {nullptr}; /** The currently focused YAML node. */
std::vector<BasicNodeType*> m_node_stack {}; /** The stack of YAML nodes. */
yaml_version_t m_yaml_version {yaml_version_t::VER_1_2}; /** The YAML version specification type. */
uint32_t m_current_indent_width {0}; /** The current indentation width. */
bool m_needs_anchor_impl {false}; /** A flag to determine the need for YAML anchor node implementation */
string_type m_anchor_name {}; /** The last YAML anchor name. */
std::unordered_map<std::string, BasicNodeType> m_anchor_table {}; /** The table of YAML anchor nodes. */
Expand Down
29 changes: 0 additions & 29 deletions include/fkYAML/detail/input/lexical_analyzer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,6 @@ class lexical_analyzer
using float_number_type = typename BasicNodeType::float_number_type;
using string_type = typename BasicNodeType::string_type;

private:
/**
* @struct position
* @brief Information set of analyzed data counters.
*/
struct position
{
//!< The total read char counts from the input buffer.
size_t total_read_char_counts {0};
//!< The total read line counts.
size_t total_read_line_counts {0};
//!< The total read char counts in the current line.
size_t read_char_counts_in_line {0};
//!< The total char counts in the previous line.
size_t prev_char_counts_in_line {0};
};

public:
/**
* @brief Construct a new lexical_analyzer object.
*/
Expand All @@ -94,7 +76,6 @@ class lexical_analyzer
{
}

public:
/**
* @brief Get the next lexical token type by scanning the left of the input buffer.
*
Expand Down Expand Up @@ -798,7 +779,6 @@ class lexical_analyzer

const bool needs_last_double_quote = (m_input_handler.get_current() == '\"');
const bool needs_last_single_quote = (m_input_handler.get_current() == '\'');
size_t start_pos_backup = m_position_info.total_read_char_counts;
char_int_type current = (needs_last_double_quote || needs_last_single_quote) ? m_input_handler.get_next()
: m_input_handler.get_current();

Expand Down Expand Up @@ -888,13 +868,6 @@ class lexical_analyzer
continue;
}

if (next == '\r' || next == '\n')
{
size_t current_pos_backup = m_position_info.total_read_char_counts;
m_position_info.total_read_char_counts = start_pos_backup;
m_position_info.total_read_char_counts = current_pos_backup;
}

return lexical_token_t::STRING_VALUE;
}

Expand Down Expand Up @@ -1168,8 +1141,6 @@ class lexical_analyzer
input_handler_type m_input_handler;
//!< A temporal buffer to store a string to be parsed to an actual datum.
input_string_type m_value_buffer {};
//!< The information set for input buffer.
position m_position_info {};
//!< The last found token type.
lexical_token_t m_last_token_type {lexical_token_t::END_OF_BUFFER};
//!< A temporal bool holder.
Expand Down

0 comments on commit 3d24ee8

Please sign in to comment.