Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: src/sksl/ir/SkSLSymbolTable.cpp

Issue 1984363002: initial checkin of SkSL compiler (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: more comments from Ben Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkSLSymbolTable.h"
9
10 namespace SkSL {
11
12 std::vector<std::shared_ptr<FunctionDeclaration>> get_functions(std::shared_ptr< Symbol> s) {
13 std::vector<std::shared_ptr<FunctionDeclaration>> result;
14 switch (s->fKind) {
15 case Symbol::kFunctionDeclaration_Kind:
16 result.push_back(std::static_pointer_cast<FunctionDeclaration>(s));
dogben 2016/06/21 21:52:50 nit: return {std::static_pointer_cast<FunctionDecl
17 break;
18 case Symbol::kUnresolvedFunction_Kind:
19 for (auto f : std::static_pointer_cast<UnresolvedFunction>(s)->fFunc tions) {
dogben 2016/06/21 21:52:50 nit: return std::static_pointer_cast<UnresolvedFun
20 result.push_back(f);
21 }
22 break;
23 default:
24 break;
25 }
26 return result;
27 }
28
29 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698