mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 06:33:30 +00:00
SymbolTable: Rename GetSymbol() to Get()
The Symbol suffix is unnecessary, given the class name Change-Id: Ibf222555a8bf5c3e4b6cf27e8006573570b1bd48 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38542 Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
c40f627bea
commit
d542a2875f
@ -52,7 +52,7 @@ Symbol Program::RegisterSymbol(const std::string& name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Symbol Program::GetSymbol(const std::string& name) const {
|
Symbol Program::GetSymbol(const std::string& name) const {
|
||||||
return symbol_table_.GetSymbol(name);
|
return symbol_table_.Get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Program::SymbolToName(const Symbol sym) const {
|
std::string Program::SymbolToName(const Symbol sym) const {
|
||||||
|
@ -45,7 +45,7 @@ Symbol SymbolTable::Register(const std::string& name) {
|
|||||||
return sym;
|
return sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbol SymbolTable::GetSymbol(const std::string& name) const {
|
Symbol SymbolTable::Get(const std::string& name) const {
|
||||||
auto it = name_to_symbol_.find(name);
|
auto it = name_to_symbol_.find(name);
|
||||||
return it != name_to_symbol_.end() ? it->second : Symbol();
|
return it != name_to_symbol_.end() ? it->second : Symbol();
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class SymbolTable {
|
|||||||
/// Returns the symbol for the given `name`
|
/// Returns the symbol for the given `name`
|
||||||
/// @param name the name to lookup
|
/// @param name the name to lookup
|
||||||
/// @returns the symbol for the name or symbol::kInvalid if not found.
|
/// @returns the symbol for the name or symbol::kInvalid if not found.
|
||||||
Symbol GetSymbol(const std::string& name) const;
|
Symbol Get(const std::string& name) const;
|
||||||
|
|
||||||
/// Returns the name for the given symbol
|
/// Returns the name for the given symbol
|
||||||
/// @param symbol the symbol to retrieve the name for
|
/// @param symbol the symbol to retrieve the name for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user