Changeset 8 for trunk


Ignore:
Timestamp:
01/24/13 10:10:27 (12 years ago)
Author:
epyon
Message:
  • fixes to resource_manager.hh (still not working :P)
  • string utility header
Location:
trunk/nv
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/resource_manager.hh

    r7 r8  
    1515#include <nv/resource.hh>
    1616#include <nv/singleton.hh>
     17#include <string>
    1718#include <unordered_map>
    1819
    1920namespace nv
    2021{
    21     typedef std::shared_ptr<resource> (*resource_constructor_func)();
     22        typedef std::shared_ptr<resource> (*resource_constructor_func)();
    2223
    2324        template <typename TYPE>
    2425        std::shared_ptr<resource> resource_constructor()
    2526        {
    26                 return std::shared_ptr<TYPE>();
     27                return std::static_pointer_cast<resource>( std::shared_ptr<TYPE>( new TYPE() ) );
    2728        }
    2829
Note: See TracChangeset for help on using the changeset viewer.