Results 1 to 7 of 7

Thread: QT + mingw and 'inline' functions?

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QT + mingw and 'inline' functions?

    What is your opinion about using inline functions?
    I'm using QT+mingw.

    I have read in some place that 'modern compilers' do optimizing works to make 'autoinline' if neccessary... (or something like this)

    Any idea ? Thanks

  2. #2
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT + mingw and 'inline' functions?

    Personally, I don't bother with them any more. As you said, compilers are clever enough nowadays, so... I leave it to them to decide what is best. Also, inlining can, in some cases, make things worse, so...

  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + mingw and 'inline' functions?

    But, if you see at QT code, you can see inline functions....

  4. #4
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT + mingw and 'inline' functions?

    Quote Originally Posted by tonnot View Post
    But, if you see at QT code, you can see inline functions....
    Yes and so what? It's their call and I gave you mine. Now, one might argue that their call is probably better than mine, and that is completely fine with me. Still, at the end of the day, it's your decision. So, just gather as much information as possible and decide for yourself, e.g.

  5. The following user says thank you to agarny for this useful post:

    tonnot (24th February 2011)

  6. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT + mingw and 'inline' functions?

    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #6
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + mingw and 'inline' functions?

    Thank you very much

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT + mingw and 'inline' functions?

    Quote Originally Posted by tonnot View Post
    But, if you see at QT code, you can see inline functions....
    Qt is available for more than one compiler and not all compilers are equally smart. Besides, forcing a function to be inlined has its merits (e.g. you don't need to have the .cpp file for a class).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. c++ templates , inline functions and Qt GNU LGPL v. 2.1
    By elizabeth.h1 in forum Installation and Deployment
    Replies: 4
    Last Post: 18th August 2009, 10:36
  2. How to start a thread (inline)
    By DiamonDogX in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2009, 21:53
  3. inline function in qdatetime.h
    By jamadagni in forum Newbie
    Replies: 1
    Last Post: 17th March 2007, 09:28
  4. Inline functons causing Havoc
    By sunil.thaha in forum Qt Programming
    Replies: 4
    Last Post: 12th January 2006, 06:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.