File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -169,14 +169,7 @@ ExitStatus App::Application::run() {
169169
170170 // (f(t), g(t))
171171 std::string func_str (function);
172- auto trim = [](std::string s) {
173- const char * ws = " \t\n\r " ;
174- size_t start = s.find_first_not_of (ws);
175- size_t end = s.find_last_not_of (ws);
176- if (start == std::string::npos)
177- return std::string ();
178- return s.substr (start, end - start + 1 );
179- };
172+
180173
181174 bool plotted = false ;
182175
Original file line number Diff line number Diff line change 55#ifndef IMGRAPH_FUNCS_HPP
66#define IMGRAPH_FUNCS_HPP
77#include < numbers>
8-
8+ #include < string>
9+ #include < cctype>
910#include " exprtk.hpp"
1011
1112inline void addConstants (exprtk::symbol_table<double > &symbolTable) {
@@ -18,4 +19,14 @@ inline void addConstants(exprtk::symbol_table<double> &symbolTable) {
1819 symbolTable.add_constant (" γ" , std::numbers::egamma);
1920}
2021
22+ inline std::string trim (const std::string& s) {
23+ const char * ws = " \t\n\r " ;
24+ size_t start = s.find_first_not_of (ws);
25+ size_t end = s.find_last_not_of (ws);
26+ if (start == std::string::npos)
27+ return std::string ();
28+ return s.substr (start, end - start + 1 );
29+ }
30+
2131#endif // IMGRAPH_FUNCS_HPP
32+
You can’t perform that action at this time.
0 commit comments