diff options
author | Lauro Moura <lauromoura@expertisesolutions.com.br> | 2019-02-28 17:15:48 -0300 |
---|---|---|
committer | Vitor Sousa <vitorsousa@expertisesolutions.com.br> | 2019-02-28 17:20:53 -0300 |
commit | c3ed0791a6c07773e90ff38149838bdc818ba292 (patch) | |
tree | a5c860b5ea292269c484d65b0833ae2aa739803c /src/bin/eolian_mono/eolian/mono/utils.hh | |
parent | 7bd3942e23abb423de695c51d69b8c05af11c87d (diff) |
efl-csharp: Fix variable generation for Roslyn
Summary:
Mono's old compiler (mcs) accepts LL as suffix for longs while Roslyn
(csc) is strict, allowing only a single L.
Test Plan: Run tests
Reviewers: vitor.sousa, felipealmeida
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8061
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/utils.hh')
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/utils.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/utils.hh b/src/bin/eolian_mono/eolian/mono/utils.hh index 0912db8a71..cbea48afa3 100644 --- a/src/bin/eolian_mono/eolian/mono/utils.hh +++ b/src/bin/eolian_mono/eolian/mono/utils.hh | |||
@@ -70,6 +70,14 @@ namespace eolian_mono { namespace utils { | |||
70 | name.erase(std::remove(name.begin(), name.end(), target), name.end()); | 70 | name.erase(std::remove(name.begin(), name.end(), target), name.end()); |
71 | return name; | 71 | return name; |
72 | } | 72 | } |
73 | |||
74 | inline bool ends_with(std::string const& source, std::string suffix) | ||
75 | { | ||
76 | if (source.size() > suffix.size()) | ||
77 | return (0 == source.compare(source.size() - suffix.size(), suffix.size(), suffix)); | ||
78 | else | ||
79 | return false; | ||
80 | } | ||
73 | } } | 81 | } } |
74 | 82 | ||
75 | #endif | 83 | #endif |