mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 12:19:18 +02:00
reformat: functions can be made static
This commit is contained in:
@@ -81,7 +81,7 @@ class render_task
|
||||
// methods
|
||||
void run();
|
||||
void upload();
|
||||
void cancel();
|
||||
static void cancel();
|
||||
auto target() const -> std::shared_ptr<python_rt>
|
||||
{
|
||||
return m_target;
|
||||
@@ -110,19 +110,19 @@ class python_taskqueue
|
||||
python_taskqueue() = default;
|
||||
// methods
|
||||
// initializes the module. returns true on success
|
||||
auto init() -> bool;
|
||||
static auto init() -> bool;
|
||||
// shuts down the module
|
||||
void exit();
|
||||
static void exit();
|
||||
// adds specified task along with provided collection of data to the work queue. returns true on success
|
||||
auto insert(task_request const &Task) -> bool;
|
||||
static auto insert(task_request const &Task) -> bool;
|
||||
// executes python script stored in specified file. returns true on success
|
||||
auto run_file(std::string const &File, std::string const &Path = "") -> bool;
|
||||
static auto run_file(std::string const &File, std::string const &Path = "") -> bool;
|
||||
// acquires the python gil and sets the main thread as current
|
||||
void acquire_lock();
|
||||
static void acquire_lock();
|
||||
// releases the python gil and swaps the main thread out
|
||||
void release_lock();
|
||||
static void release_lock();
|
||||
|
||||
void update();
|
||||
static void update();
|
||||
|
||||
private:
|
||||
// types
|
||||
|
||||
@@ -380,7 +380,7 @@ basic_controller::log_error( std::string const &Error, int const Line ) const {
|
||||
}
|
||||
|
||||
auto
|
||||
basic_controller::guess_element_type_from_name( std::string const &Name ) const -> basic_element::type_e {
|
||||
basic_controller::guess_element_type_from_name( std::string const &Name ) -> basic_element::type_e {
|
||||
|
||||
auto const name { split_string_and_number( Name ) };
|
||||
|
||||
|
||||
@@ -104,8 +104,8 @@ private:
|
||||
// runs one cycle of current program. returns: error code or 0 if there's no error
|
||||
auto run() -> int;
|
||||
void log_error( std::string const &Error, int Line = -1 ) const;
|
||||
auto guess_element_type_from_name( std::string const &Name ) const->basic_element::type_e;
|
||||
auto inverse( int const Value ) const -> int {
|
||||
static auto guess_element_type_from_name( std::string const &Name ) -> basic_element::type_e;
|
||||
static auto inverse( int const Value ) -> int {
|
||||
return Value == 0 ? 1 : 0; }
|
||||
// element access
|
||||
auto element( element_handle const Element ) const -> basic_element const {
|
||||
|
||||
Reference in New Issue
Block a user