Skip to content

Commit

Permalink
recovered.cpp: adding inlines to some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidsmith committed Nov 30, 2023
1 parent 0a204e8 commit 7ff9649
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/recovered.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct quick_buf : public std::ostringstream,
then one needs this. Also, Qiang should be consulted on this
because he spent much time thinking about it in the context of
plants. */
static bool
static inline bool
is_chh(const std::string &s, size_t i) {
return (i < (s.length() - 2)) &&
is_cytosine(s[i]) &&
Expand All @@ -124,7 +124,7 @@ is_chh(const std::string &s, size_t i) {
}


static bool
static inline bool
is_ddg(const std::string &s, size_t i) {
return (i < (s.length() - 2)) &&
!is_cytosine(s[i]) &&
Expand All @@ -133,7 +133,7 @@ is_ddg(const std::string &s, size_t i) {
}


static bool
static inline bool
is_c_at_g(const std::string &s, size_t i) {
return (i < (s.length() - 2)) &&
is_cytosine(s[i]) &&
Expand All @@ -148,15 +148,15 @@ is_c_at_g(const std::string &s, size_t i) {
* works as long as the chromosome size is not the maximum size of a
* size_t.
*/
static uint32_t
static inline uint32_t
get_tag_from_genome_c(const string &s, const size_t pos) {
if (is_cpg(s, pos)) return 0;
else if (is_chh(s, pos)) return 1;
else if (is_c_at_g(s, pos)) return 2;
return 3;
}

static uint32_t
static inline uint32_t
get_tag_from_genome_g(const string &s, const size_t pos) {
if (is_cpg(s, pos - 1)) return 0;
else if (is_ddg(s, pos - 2)) return 1;
Expand Down

0 comments on commit 7ff9649

Please sign in to comment.