Translations:Development/Tutorials/Common Programming Mistakes/7/pt-br: Difference between revisions

From KDE TechBase
(Created page with "Se você possui um método em uma classe que não acessa nenhum membro e, portanto, não precisa de um objeto para operar, torne-o estático. Se, além disso, for uma função...")
 
(No difference)

Latest revision as of 18:20, 25 November 2019

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Development/Tutorials/Common Programming Mistakes)
If you have a method in a class that does not access any members and therefore does not need an object to operate, make it static. If additionally, it is a private helper function that is not needed outside of the file, make it a file-static function. That hides the symbol completely.

Se você possui um método em uma classe que não acessa nenhum membro e, portanto, não precisa de um objeto para operar, torne-o estático. Se, além disso, for uma função auxiliar privada que não é necessária fora do arquivo, torne-a uma função estática do arquivo. Isso esconde o símbolo completamente.