Skip to content

Commit

Permalink
bug fix: to_string(char) is not the right way to create string from char
Browse files Browse the repository at this point in the history
indeed, `to_string(char)` converts the ascii value to a string (e.g. 'L' -> 76).
use `string(&char, size)` instead.
  • Loading branch information
albestro committed Sep 6, 2024
1 parent 7072da2 commit 8835a76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/dlaf/blas/enum_parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@

/// @file

#include <string>

#include <blas/util.hh>

namespace dlaf::internal {

inline blas::Uplo char2uplo(const char uplo_c) {
blas::Uplo uplo;
blas::from_string(std::to_string(uplo_c), &uplo);
blas::from_string(std::string(&uplo_c, 1), &uplo);
return uplo;
}

Expand Down

0 comments on commit 8835a76

Please sign in to comment.