clang-format: update c/cc coding style
Update all cc code using .clang-format; please do so as well for future PRs etc.; emacs has a handy 'clang-format' mode to make this automatic. For comparing old changes with git blame, we can disregard this one using --ignore-rev (see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
This commit is contained in:
@ -17,32 +17,32 @@
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MU_RESULT_HH__
|
||||
#define MU_RESULT_HH__
|
||||
|
||||
|
||||
#include "expected.hpp"
|
||||
#include "utils/mu-error.hh"
|
||||
|
||||
|
||||
namespace Mu {
|
||||
/**
|
||||
* A Result is _either_ some value of type T, _or_ an error.
|
||||
*/
|
||||
template <typename T> using Result = tl::expected<T, Error>;
|
||||
|
||||
template <typename T> typename Result<T>::expected_type
|
||||
Ok(T&& t) {
|
||||
return Result<T>::expected(std::move(t));
|
||||
template <typename T>
|
||||
typename Result<T>::expected_type
|
||||
Ok(T&& t)
|
||||
{
|
||||
return Result<T>::expected(std::move(t));
|
||||
}
|
||||
|
||||
template <typename T> typename Result<T>::unexpected_type
|
||||
Err(Error&& err) {
|
||||
return Result<T>::unexpected(std::move(err));
|
||||
template <typename T>
|
||||
typename Result<T>::unexpected_type
|
||||
Err(Error&& err)
|
||||
{
|
||||
return Result<T>::unexpected(std::move(err));
|
||||
}
|
||||
|
||||
} // namespace Mu
|
||||
|
||||
|
||||
#endif /* MU_ERROR_HH__ */
|
||||
|
||||
Reference in New Issue
Block a user