C++ Load text file, optimization
There is my source code loading text file and delimitting each line to single  items (words). 

How to further optimize the code? Testing empty lines (and other constructions) are (in my opinion) a little bit inefficient....

    typedef std::vector < std::string >  TLines;
    typedef std::vector < std::vector < std::string > > TItems;

    TItems TFloadFile ( const char * file_name )
    {
        //Load projection from file
        unsigned int lines = 0;
        char buffer[BUFF];
        FILE * file;
        TItems file_words;
        TLines file_lines;


        file = fopen ( file_name, "r" );

        if ( file != NULL )
        {
                for ( ; fgets ( buffer, BUFF, file ); )
                {
                        //Remove empty lines
                        bool empty_line = true;
                        for ( unsigned i = 0; i < strlen ( buffer ); i++ )
                        {
                                if ( !isspace ( ( unsigned char ) buffer[i] ) )
                                {
                                        empty_line = false;
                                        break;
                                }
                        }

                        if ( !empty_line )
                        {
                                file_lines.push_back ( buffer );
                                lines++;
                        }
                }


                file_words.resize ( lines + 1 );
                for ( unsigned int i = 0; i < lines; i++ )
                {
                        char * word = strtok ( const_cast<char *> ( file_lines[i].c_str() ), " \t,;\r\n" );
                        for ( int j = 0; word; j++, word = strtok ( 0, " \t;\r\n" ) )
                        {
                                file_words[i].push_back ( word );
                        }
                }

                fclose ( file );
        }

        return file_words;
    }

Thanks for your help...
C++ Load text file, optimization
===

There is my source code loading text file and delimitting each line to single  items (words). 

How to further optimize the code? Testing empty lines (and other constructions) are (in my opinion) a little bit inefficient....

    typedef std::vector < std::string >  TLines;
    typedef std::vector < std::vector < std::string > > TItems;

    TItems TFloadFile ( const char * file_name )
    {
        //Load projection from file
        unsigned int lines = 0;
        char buffer[BUFF];
        FILE * file;
        TItems file_words;
        TLines file_lines;


        file = fopen ( file_name, "r" );

        if ( file != NULL )
        {
                for ( ; fgets ( buffer, BUFF, file ); )
                {
                        //Remove empty lines
                        bool empty_line = true;
                        for ( unsigned i = 0; i < strlen ( buffer ); i++ )
                        {
                                if ( !isspace ( ( unsigned char ) buffer[i] ) )
                                {
                                        empty_line = false;
                                        break;
                                }
                        }

                        if ( !empty_line )
                        {
                                file_lines.push_back ( buffer );
                                lines++;
                        }
                }


                file_words.resize ( lines + 1 );
                for ( unsigned int i = 0; i < lines; i++ )
                {
                        char * word = strtok ( const_cast<char *> ( file_lines[i].c_str() ), " \t,;\r\n" );
                        for ( int j = 0; word; j++, word = strtok ( 0, " \t;\r\n" ) )
                        {
                                file_words[i].push_back ( word );
                        }
                }

                fclose ( file );
        }

        return file_words;
    }

Thanks for your help...