Commits

Josh Aune  committed 93e911c

Fix build with newer g++, const char conversion

  • Participants
  • Parent commits 8754920

Comments (0)

Files changed (2)

File src/metalist.cpp

 	uint64_t atom_offsets = 0;
 	char* uuid_outfile = (char*)calloc(1, sizeof(char)*MAXPATHLEN+1); //malloc a new string because it may be a cli arg for a specific output path	
 	if (output_path == NULL) {
-		char* orig_suffix = strrchr(originating_file, '.');
+		const char* orig_suffix = strrchr(originating_file, '.');
 		if (orig_suffix == NULL) {
 			fprintf(stdout, "AP warning: a file extension for the input file was not found.\n\tGlobbing onto original filename...\n");
 			path_len = strlen(originating_file);

File src/parsley.cpp

 
 void APar_DeriveNewPath(const char *filePath, char* temp_path, int output_type, const char* file_kind, const char* forced_suffix, bool random_filename = true) {
 	const char* suffix = NULL;
-	char* file_name = NULL;
+	const char* file_name = NULL;
 	size_t file_name_len = 0;
 	bool relative_path = false;
 	
 			free_modified_name = true;
 			if (forced_suffix_type == FORCE_M4B_TYPE) { //using --stik Audiobook with --overWrite will change the original file's extension
 				uint16_t filename_len = strlen(ISObasemediafile);
-				char* suffix = strrchr(ISObasemediafile, '.');
+				const char* suffix = strrchr(ISObasemediafile, '.');
 				memcpy(originating_file, ISObasemediafile, filename_len+1 );
 				memcpy(originating_file + (filename_len - strlen(suffix) ), ".m4b", 5 );
 			}