added a const keyword for a methods that return constant literal...

This commit is contained in:
hbina085 2019-05-20 13:36:24 -04:00
parent 9643b2b6de
commit f78baa5f93
24 changed files with 24 additions and 24 deletions

View File

@ -273,7 +273,7 @@ public:
virtual String get_environment(const String &p_var) const = 0;
virtual bool set_environment(const String &p_var, const String &p_value) const = 0;
virtual String get_name() = 0;
virtual String get_name() const = 0;
virtual List<String> get_cmdline_args() const { return _cmdline; }
virtual String get_model_name() const;

View File

@ -170,7 +170,7 @@ String OS_Unix::get_stdin_string(bool p_block) {
return "";
}
String OS_Unix::get_name() {
String OS_Unix::get_name() const {
return "Unix";
}

View File

@ -76,7 +76,7 @@ public:
virtual Error set_cwd(const String &p_cwd);
virtual String get_name();
virtual String get_name() const;
virtual Date get_date(bool utc) const;
virtual Time get_time(bool utc) const;

View File

@ -330,7 +330,7 @@ Map<int, TextEdit::HighlighterInfo> GDScriptSyntaxHighlighter::_get_line_syntax_
return color_map;
}
String GDScriptSyntaxHighlighter::get_name() {
String GDScriptSyntaxHighlighter::get_name() const {
return "GDScript";
}

View File

@ -65,7 +65,7 @@ public:
virtual void _update_cache();
virtual Map<int, TextEdit::HighlighterInfo> _get_line_syntax_highlighting(int p_line);
virtual String get_name();
virtual String get_name() const;
virtual List<String> get_supported_languages();
};

View File

@ -277,7 +277,7 @@ Size2 OS_Android::get_window_size() const {
return Vector2(default_videomode.width, default_videomode.height);
}
String OS_Android::get_name() {
String OS_Android::get_name() const {
return "Android";
}

View File

@ -139,7 +139,7 @@ public:
virtual Size2 get_window_size() const;
virtual String get_name();
virtual String get_name() const;
virtual MainLoop *get_main_loop() const;
virtual bool can_draw() const;

View File

@ -69,7 +69,7 @@ void OS_Haiku::run() {
main_loop->finish();
}
String OS_Haiku::get_name() {
String OS_Haiku::get_name() const {
return "Haiku";
}

View File

@ -74,7 +74,7 @@ public:
OS_Haiku();
void run();
virtual String get_name();
virtual String get_name() const;
virtual MainLoop *get_main_loop() const;

View File

@ -495,7 +495,7 @@ String OSIPhone::get_user_data_dir() const {
return data_dir;
};
String OSIPhone::get_name() {
String OSIPhone::get_name() const {
return "iOS";
};

View File

@ -174,7 +174,7 @@ public:
void set_data_dir(String p_dir);
virtual String get_name();
virtual String get_name() const;
Error shell_open(String p_uri);

View File

@ -1159,7 +1159,7 @@ Error OS_JavaScript::shell_open(String p_uri) {
return OK;
}
String OS_JavaScript::get_name() {
String OS_JavaScript::get_name() const {
return "HTML5";
}

View File

@ -146,7 +146,7 @@ public:
virtual void set_icon(const Ref<Image> &p_icon);
String get_executable_path() const;
virtual Error shell_open(String p_uri);
virtual String get_name();
virtual String get_name() const;
virtual bool can_draw() const;
virtual String get_resource_dir() const;

View File

@ -165,7 +165,7 @@ public:
void wm_minimized(bool p_minimized);
virtual String get_name();
virtual String get_name() const;
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");

View File

@ -1551,7 +1551,7 @@ void OS_OSX::delete_main_loop() {
main_loop = NULL;
}
String OS_OSX::get_name() {
String OS_OSX::get_name() const {
return "OSX";
}

View File

@ -190,7 +190,7 @@ bool OS_Server::can_draw() const {
return false; //can never draw
};
String OS_Server::get_name() {
String OS_Server::get_name() const {
return "Server";
}

View File

@ -93,7 +93,7 @@ protected:
virtual void set_main_loop(MainLoop *p_main_loop);
public:
virtual String get_name();
virtual String get_name() const;
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);

View File

@ -530,7 +530,7 @@ OS::VideoMode OS_UWP::get_video_mode(int p_screen) const {
void OS_UWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
String OS_UWP::get_name() {
String OS_UWP::get_name() const {
return "UWP";
}

View File

@ -195,7 +195,7 @@ public:
virtual MainLoop *get_main_loop() const;
virtual String get_name();
virtual String get_name() const;
virtual Date get_date(bool utc) const;
virtual Time get_time(bool utc) const;

View File

@ -2119,7 +2119,7 @@ void OS_Windows::request_attention() {
FlashWindowEx(&info);
}
String OS_Windows::get_name() {
String OS_Windows::get_name() const {
return "Windows";
}

View File

@ -246,7 +246,7 @@ public:
virtual MainLoop *get_main_loop() const;
virtual String get_name();
virtual String get_name() const;
virtual Date get_date(bool utc) const;
virtual Time get_time(bool utc) const;

View File

@ -2592,7 +2592,7 @@ String OS_X11::get_clipboard() const {
return ret;
}
String OS_X11::get_name() {
String OS_X11::get_name() const {
return "X11";
}

View File

@ -216,7 +216,7 @@ protected:
bool is_window_maximize_allowed();
public:
virtual String get_name();
virtual String get_name() const;
virtual void set_cursor_shape(CursorShape p_shape);
virtual CursorShape get_cursor_shape() const;

View File

@ -720,7 +720,7 @@ public:
virtual void _update_cache() = 0;
virtual Map<int, TextEdit::HighlighterInfo> _get_line_syntax_highlighting(int p_line) = 0;
virtual String get_name() = 0;
virtual String get_name() const = 0;
virtual List<String> get_supported_languages() = 0;
void set_text_editor(TextEdit *p_text_editor);