mirror of
https://github.com/opus-tango/IntroductionToVulkan.git
synced 2026-03-20 03:55:26 +00:00
Renamed "Tutorial" namespace to "ApiWithoutSecrets". Added ApiWithoutSecrets namescape to all files. Placed function pointers in an ApiWithoutSecrets namespace to fix errors on Linux.
This commit is contained in:
@@ -12,27 +12,31 @@
|
||||
#include <iostream>
|
||||
#include "Tools.h"
|
||||
|
||||
namespace Tools {
|
||||
namespace ApiWithoutSecrets {
|
||||
|
||||
std::vector<char> GetBinaryFileContents( std::string const &filename ) {
|
||||
namespace Tools {
|
||||
|
||||
std::ifstream file( filename, std::ios::binary );
|
||||
if( file.fail() ) {
|
||||
std::cout << "Could not open \"" << filename << "\" file!" << std::endl;
|
||||
return std::vector<char>();
|
||||
std::vector<char> GetBinaryFileContents( std::string const &filename ) {
|
||||
|
||||
std::ifstream file( filename, std::ios::binary );
|
||||
if( file.fail() ) {
|
||||
std::cout << "Could not open \"" << filename << "\" file!" << std::endl;
|
||||
return std::vector<char>();
|
||||
}
|
||||
|
||||
std::streampos begin, end;
|
||||
begin = file.tellg();
|
||||
file.seekg( 0, std::ios::end );
|
||||
end = file.tellg();
|
||||
|
||||
std::vector<char> result( static_cast<size_t>(end - begin) );
|
||||
file.seekg( 0, std::ios::beg );
|
||||
file.read( &result[0], end - begin );
|
||||
file.close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::streampos begin, end;
|
||||
begin = file.tellg();
|
||||
file.seekg( 0, std::ios::end );
|
||||
end = file.tellg();
|
||||
} // namespace Tools
|
||||
|
||||
std::vector<char> result( static_cast<size_t>(end - begin) );
|
||||
file.seekg( 0, std::ios::beg );
|
||||
file.read( &result[0], end - begin );
|
||||
file.close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace ApiWithoutSecrets
|
||||
Reference in New Issue
Block a user