Add noexcept specifiers to keyboard_input functions
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#include "input_parser.h"
|
#include "input_parser.h"
|
||||||
|
|
||||||
std::optional<Token> getModifier( const char& character )
|
std::optional<Token> getModifier( const char& character ) noexcept
|
||||||
{
|
{
|
||||||
switch ( character )
|
switch ( character )
|
||||||
{
|
{
|
||||||
@@ -19,7 +19,7 @@ std::optional<Token> getModifier( const char& character )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Token> getNumberOrLetter( const char& character )
|
std::optional<Token> getNumberOrLetter( const char& character ) noexcept
|
||||||
{
|
{
|
||||||
if ( islower( character ) || isdigit( character ) )
|
if ( islower( character ) || isdigit( character ) )
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,7 @@ std::optional<Token> getNumberOrLetter( const char& character )
|
|||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Token> getFunctionNumber( const char& character )
|
std::optional<Token> getFunctionNumber( const char& character ) noexcept
|
||||||
{
|
{
|
||||||
switch ( character )
|
switch ( character )
|
||||||
{
|
{
|
||||||
@@ -57,7 +57,7 @@ std::optional<Token> getFunctionNumber( const char& character )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Token> checkIfLegalCapitalLiteral( std::string input )
|
std::optional<Token> checkIfLegalCapitalLiteral( std::string input ) noexcept
|
||||||
{
|
{
|
||||||
// C++ can't do string comparisons in switches. :(
|
// C++ can't do string comparisons in switches. :(
|
||||||
if ( input == "BACKSPACE" )
|
if ( input == "BACKSPACE" )
|
||||||
@@ -149,7 +149,8 @@ std::optional<Token> checkIfLegalCapitalLiteral( std::string input )
|
|||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Token> ParseKeyboardInputsToTokens( const std::string inputs )
|
std::vector<Token>
|
||||||
|
ParseKeyboardInputsToTokens( const std::string inputs ) noexcept
|
||||||
{
|
{
|
||||||
std::vector<Token> tokens{};
|
std::vector<Token> tokens{};
|
||||||
|
|
||||||
|
|||||||
@@ -88,4 +88,4 @@ enum class Token
|
|||||||
MODIFIER_SUPER,
|
MODIFIER_SUPER,
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<Token> ParseKeyboardInputsToTokens( std::string inputs );
|
std::vector<Token> ParseKeyboardInputsToTokens( std::string inputs ) noexcept;
|
||||||
|
|||||||
Reference in New Issue
Block a user