Skip to content

Commit

Permalink
🎨 Remove trailing spaces and added endlines
Browse files Browse the repository at this point in the history
  • Loading branch information
raidgar98 committed Nov 12, 2022
1 parent 692ceea commit a094ec8
Show file tree
Hide file tree
Showing 21 changed files with 106 additions and 106 deletions.
2 changes: 1 addition & 1 deletion cmake/add_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ MACRO(add_ctest_flags)
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
endforeach()

ENDMACRO()
ENDMACRO()
2 changes: 1 addition & 1 deletion cmake/add_include_directories.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ MACRO(SUBDIR_INCLUDE_DIRECTORIES curdir)
ENDIF()
ENDFOREACH()
include_directories( ${dirlist} )
ENDMACRO()
ENDMACRO()
12 changes: 6 additions & 6 deletions cmake/create_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ MACRO(create_library libname)
add_library(${libname} STATIC src/${libname}.cpp)
target_include_directories( ${libname} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include PRIVATE ${BOOST_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} )
message("for ${libname} added include dir: ${CMAKE_CURRENT_SOURCE_DIR}/include")

set(${libname}_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "")

set(variadic ${ARGN})
list(LENGTH variadic var_length)


if(var_length GREATER 0)
target_link_libraries( ${libname} ${variadic} )
foreach( pack ${variadic} )
message("for ${libname} adding pack: ${pack} with includes: ${${pack}_INCLUDE_DIRECTORIES}")
if(pack STREQUAL "Drogon::Drogon")
continue()
if(pack STREQUAL "Drogon::Drogon")
continue()
endif()
include_directories(${${pack}_INCLUDE_DIRECTORIES})
endforeach()
Expand All @@ -41,8 +41,8 @@ MACRO(create_qt_library libname)

foreach( pack ${variadic} )
message("for ${libname} adding pack: ${pack} with includes: ${${pack}_INCLUDE_DIRECTORIES}")
if(pack STREQUAL "Drogon::Drogon")
continue()
if(pack STREQUAL "Drogon::Drogon")
continue()
endif()
include_directories(${${pack}_INCLUDE_DIRECTORIES})
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion cmake/get_all_directories.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ MACRO(SUBDIRLIST result curdir)
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
ENDMACRO()
ENDMACRO()
2 changes: 1 addition & 1 deletion cmake/get_all_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ENDMACRO()
MACRO(GET_ALL_DIRS sub return_list reg)
file(GLOB_RECURSE ${return_list} LIST_DIRECTORIES true ${CMAKE_CURRENT_SOURCE_DIR}/${sub}/*)
list(FILTER ${return_list} INCLUDE REGEX ${reg})
ENDMACRO()
ENDMACRO()
38 changes: 19 additions & 19 deletions include/serek/private/acceptors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @brief Contains declarations and definition of classes that handles visitors
* @version 0.1
* @date 2021-08-29
*
*
* @copyright Copyright (c) 2021
*
*
*/

#pragma once
Expand All @@ -23,15 +23,15 @@ namespace serek

/**
* @brief Predeclaration of acceptor_impl
*
*
* @tparam acceptor_worker_t statically checks is given worker is valid
*/
template<reqs::acceptor_worker_req acceptor_worker_t>
struct acceptor_impl;

/**
* @brief Most common visitor handler, which just evaluates worker
*
*
* @tparam acceptor_worker_t worker to call
* @tparam child_t type forwarded to worker; type from derivation tree of this class
*/
Expand All @@ -40,11 +40,11 @@ namespace serek
{
/**
* @brief performs actuall job (invokes worker)
*
*
* @tparam visitor_t type of visitor to invoker
* @param visitor visitor to invoke
* @return visitor_result_t
*
*
* @see visitor_req
*/
template<reqs::visitor_req visitor_t>
Expand Down Expand Up @@ -72,17 +72,17 @@ namespace serek
{
/**
* @brief helper function, that invokes visitor
*
*
* @param visitor visitor to invoke
* @param acceptor object to pass to visitor
* @return visitor_result_t
* @return visitor_result_t
*/
inline visitor_result_t call_visitator(auto* visitor, auto* acceptor) { return (*visitor)(acceptor); }
} // namespace

/**
* @brief base for further acceptor workers
*
*
* @tparam child_t type that is currently handled
*/
template<typename child_t>
Expand All @@ -92,8 +92,8 @@ namespace serek

protected:
/**
* @brief helper method that validates
*
* @brief helper method that validates
*
* @tparam visitor_t type of visitor
* @param visitor visitor to check
*/
Expand All @@ -107,15 +107,15 @@ namespace serek

/**
* @brief most common worker, that just invokes visitor
*
*
* @tparam child_t currently processed type
*/
template<typename child_t>
struct basic_acceptor_worker : public acceptor_worker_base<child_t>
{
/**
* @brief Construct a new basic acceptor worker object and actally performs action
*
*
* @tparam visitor_t type of visitor
* @param acceptor object to handle via visitor
* @param visitor visitor to call
Expand All @@ -140,23 +140,23 @@ namespace serek

/**
* @brief alias for acceptor that is in first member in struct
*
*
* @tparam child_t given type of first member
*/
template<typename child_t>
using finalize_acceptor_worker = basic_acceptor_worker<child_t>;

/**
* @brief predeclaration is used here to extract type further in specialisation
*
*
* @tparam value static pointer to field
*/
template<auto value>
struct forward_acceptor_creator;

/**
* @brief type wrapper for `forward_acceptor_worker_impl`
*
*
* @tparam class_t type of top level owner of field
* @tparam prev_field_t type of previous memeber
* @tparam value static pointer to previous member
Expand All @@ -166,15 +166,15 @@ namespace serek
{
/**
* @brief actual implementation of acceptor worker, which forward visitor to previous member
*
*
* @tparam child_t type of current field
*/
template<typename child_t>
struct forward_acceptor_worker_impl : public acceptor_worker_base<child_t>
{
/**
* @brief Construct a new forward acceptor worker impl object and evaluates visitor
*
*
* @tparam visitor_t type of visitor
* @param acceptor object to pass to visitor
* @param visitor visito to call
Expand All @@ -201,4 +201,4 @@ namespace serek
};
} // namespace workers
} // namespace acceptors
} // namespace serek
} // namespace serek
36 changes: 18 additions & 18 deletions include/serek/private/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @brief Contains declarations of exception mechanism
* @version 0.1
* @date 2021-08-29
*
*
* @copyright Copyright (c) 2021
*
*
*/

#pragma once
Expand Down Expand Up @@ -34,22 +34,22 @@ namespace serek
{
/**
* @brief Construct a new exception base object
*
*
* @param msg message to print on what()
*/
explicit exception_base(str_v msg = "unknown");

/**
* @brief accessor to `message`
*
* @return const char*
*
* @return const char*
*/
virtual const char* what() const noexcept;

/**
* @brief returns `exception_base::what()` with stacktrace
*
* @return str
*
* @return str
*/
virtual str pretty() const noexcept;

Expand Down Expand Up @@ -81,16 +81,16 @@ namespace serek
{
/**
* @brief Construct a new comprasion fail exception object
*
*
* @param i_what forwarded to parent (what())
* @param i_comprasion_result string to set as comprasion result
*/
explicit comprasion_fail_exception(const str_v i_what, const str& i_comprasion_result = str{}) : assert_exception{i_what}, comprasion_result{new str{i_comprasion_result}} {}

/**
* @brief overrides default pretty, by preinserting `i_comprasion_result`
*
* @return str
*
* @return str
*/
virtual str pretty() const noexcept override;

Expand All @@ -102,12 +102,12 @@ namespace serek
{
/**
* @brief generates message of failed comprasion
*
*
* @tparam operator_t functor type
* @tparam T type of element that was compared
* @param l_value left operand
* @param r_value right operand
* @return str
* @return str
*/
template<typename operator_t, typename T>
str format_fail_comprasion(const T& l_value, const T& r_value)
Expand All @@ -121,7 +121,7 @@ namespace serek

/**
* @brief alternative to assert
*
*
* @tparam exceptions::assert_exception exception type to throw
* @param result result from some action
* @param error_message message to forwrd to exception
Expand All @@ -134,7 +134,7 @@ namespace serek

/**
* @brief overload of above, allows additionally print given values
*
*
* @tparam operator_t functor that will be used for comprasion ( @see std::less )
* @tparam T type of compared elements
* @param l_value left operand
Expand All @@ -150,7 +150,7 @@ namespace serek

/**
* @brief overload of above, specialized for checking pointers
*
*
* @tparam pointer_t type of pointer to validate
* @param ptr pointer to check
* @param error_message message to forwrd to exception
Expand All @@ -164,9 +164,9 @@ namespace serek

/**
* @brief operator to easly print exceptions
*
*
* @param os stream
* @param ex exception
* @return std::ostream&
* @return std::ostream&
*/
std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex);
std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex);
6 changes: 3 additions & 3 deletions include/serek/private/field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @brief Contains implementation of field template representation
* @version 0.1
* @date 2021-08-03
*
*
* @copyright Copyright (c) 2021
*
*
*/

#pragma once
Expand Down Expand Up @@ -54,4 +54,4 @@ namespace serek
template<typename first_field_t>
using ffield = detail::field_impl_value_handler<first_field_t, detail::finalize_acceptor_worker>;

} // namespace serek
} // namespace serek
14 changes: 7 additions & 7 deletions include/serek/private/pack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @brief Contains implementation of wrapper for class
* @version 0.1
* @date 2021-09-07
*
*
* @copyright Copyright (c) 2021
*
*
*/

#pragma once
Expand All @@ -24,15 +24,15 @@ namespace serek
{
/**
* @brief can be used to wrap class to be iterable over fields
*
*
* @tparam last_field last field
*/
template<auto last_field>
struct pack_impl;

/**
* @copydoc pack_impl
*
*
* @tparam owner_t type of class that is wrapped
* @tparam previous_field_t type of last field
* @tparam owner_t::*value static pointer to last field
Expand All @@ -50,10 +50,10 @@ namespace serek

/**
* @brief forwards visitor to last field
*
*
* @tparam visitor_t type of visitor to forward
* @param v visitor to forward
* @return visitor_result_t
* @return visitor_result_t
*/
template<reqs::visitor_req visitor_t>
visitor_result_t visit(visitor_t* v)
Expand Down Expand Up @@ -85,4 +85,4 @@ namespace serek
*/
template<auto last_field>
using pack = typename detail::pack_impl<last_field>;
} // namespace serek
} // namespace serek
Loading

0 comments on commit a094ec8

Please sign in to comment.