* Pass HashType values instead of strings.
This commit is contained in:
		
							parent
							
								
									1307b22223
								
							
						
					
					
						commit
						ff762fb499
					
				
					 11 changed files with 36 additions and 23 deletions
				
			
		|  | @ -125,7 +125,7 @@ static void opAddFixed(Strings opFlags, Strings opArgs) | |||
|     if (opArgs.empty()) | ||||
|         throw UsageError("first argument must be hash algorithm"); | ||||
|      | ||||
|     string hashAlgo = opArgs.front(); | ||||
|     HashType hashAlgo = parseHashType(opArgs.front()); | ||||
|     opArgs.pop_front(); | ||||
| 
 | ||||
|     for (Strings::iterator i = opArgs.begin(); i != opArgs.end(); ++i) | ||||
|  | @ -155,13 +155,13 @@ static void opPrintFixedPath(Strings opFlags, Strings opArgs) | |||
|         throw UsageError(format("`--print-fixed-path' requires three arguments")); | ||||
|      | ||||
|     Strings::iterator i = opArgs.begin(); | ||||
|     string hashAlgo = *i++; | ||||
|     HashType hashAlgo = parseHashType(*i++); | ||||
|     string hash = *i++; | ||||
|     string name = *i++; | ||||
| 
 | ||||
|     cout << format("%1%\n") % | ||||
|         makeFixedOutputPath(recursive, hashAlgo, | ||||
|             parseHash16or32(parseHashType(hashAlgo), hash), name); | ||||
|             parseHash16or32(hashAlgo, hash), name); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue