summaryrefslogtreecommitdiff
path: root/games/smc/smc-1.9_boost.patch
blob: 5cbc40a48ad22404e8fc14d3c8757c48fad8027d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -Naur smc-1.9-orig/src/core/filesystem/filesystem.cpp smc-1.9/src/core/filesystem/filesystem.cpp
--- smc-1.9-orig/src/core/filesystem/filesystem.cpp	2009-07-04 05:11:18.000000000 -0500
+++ smc-1.9/src/core/filesystem/filesystem.cpp	2009-09-07 00:28:01.000000000 -0500
@@ -142,32 +142,32 @@
 			if( fs::is_directory( *dir_itr ) )
 			{
 				// ignore hidden directories
-				if( dir_itr->path().leaf().find( "." ) == 0 )
+				if( dir_itr->path().filename().find( "." ) == 0 )
 				{
 					continue;
 				}
 
 				if( with_directories )
 				{
-					valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
+					valid_files.push_back( dir + "/" + dir_itr->path().filename() );
 				}
 
 				// load all items from the sub-directory
 				if( search_in_sub_directories )
 				{
-					vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories );
+					vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename(), file_type, with_directories );
 					valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() );
 				}
 			}
 			// valid file
-			else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos )
+			else if( file_type.empty() || dir_itr->path().filename().rfind( file_type ) != std::string::npos )
 			{
-				valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
+				valid_files.push_back( dir + "/" + dir_itr->path().filename() );
 			}
 		}
 		catch( const std::exception &ex )
 		{
-			printf( "%s %s\n", dir_itr->path().leaf().c_str(), ex.what() );
+			printf( "%s %s\n", dir_itr->path().filename().c_str(), ex.what() );
 		}
 	}
 
diff -Naur smc-1.9-orig/src/overworld/world_manager.cpp smc-1.9/src/overworld/world_manager.cpp
--- smc-1.9-orig/src/overworld/world_manager.cpp	2009-08-16 11:44:52.000000000 -0500
+++ smc-1.9/src/overworld/world_manager.cpp	2009-09-07 00:28:45.000000000 -0500
@@ -118,7 +118,7 @@
 	{
 		try
 		{
-			std::string current_dir = dir_itr->path().leaf();
+			std::string current_dir = dir_itr->path().filename();
 
 			// only directories with an existing description
 			if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )
@@ -145,7 +145,7 @@
 		}
 		catch( const std::exception &ex )
 		{
-			printf( "%s %s\n", dir_itr->path().leaf().c_str(), ex.what() );
+			printf( "%s %s\n", dir_itr->path().filename().c_str(), ex.what() );
 		}
 	}
 }