Skip to content

Commit

Permalink
Add WARN_UNUSED_RESULT to [Final]Extension
Browse files Browse the repository at this point in the history
See https://codereview.chromium.org/863583002/.

R=mark@chromium.org

Review URL: https://codereview.chromium.org/863593003

Cr-Commit-Position: refs/heads/master@{#312237}
  • Loading branch information
sgraham authored and Commit bot committed Jan 20, 2015
1 parent 0455f66 commit 9d51ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/files/file_path.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class BASE_EXPORT FilePath {
// ASSERT(new_path == path.value());
// NOTE: this is different from the original file_util implementation which
// returned the extension without a leading "." ("jpg" instead of ".jpg")
StringType Extension() const;
StringType Extension() const WARN_UNUSED_RESULT;

// Returns the path's file extension, as in Extension(), but will
// never return a double extension.
Expand All @@ -247,7 +247,7 @@ class BASE_EXPORT FilePath {
// we can rename this to Extension() and the other to something like
// LongExtension(), defaulting to short extensions and leaving the
// long "extensions" to logic like base::GetUniquePathNumber().
StringType FinalExtension() const;
StringType FinalExtension() const WARN_UNUSED_RESULT;

// Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
// NOTE: this is slightly different from the similar file_util implementation
Expand Down

0 comments on commit 9d51ce5

Please sign in to comment.