State lambda return types explicitly when multiple returns exist.

This is easier to read than casting nullptr to the desired type.

Change-Id: I19eb85f96dc4e66316e36c1839b8df25f39fa608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310178
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp
index 7042a60..a010c56 100644
--- a/src/sksl/SkSLIRGenerator.cpp
+++ b/src/sksl/SkSLIRGenerator.cpp
@@ -1909,11 +1909,11 @@
         int offset,
         std::unordered_map<const Variable*, const Variable*>* varMap,
         const Expression& expression) {
-    auto expr = [&](const std::unique_ptr<Expression>& e) {
+    auto expr = [&](const std::unique_ptr<Expression>& e) -> std::unique_ptr<Expression> {
         if (e) {
             return this->inlineExpression(offset, varMap, *e);
         }
-        return std::unique_ptr<Expression>(nullptr);
+        return nullptr;
     };
     switch (expression.fKind) {
         case Expression::kBinary_Kind: {
@@ -2018,11 +2018,11 @@
         const Variable* returnVar,
         bool haveEarlyReturns,
         const Statement& statement) {
-    auto stmt = [&](const std::unique_ptr<Statement>& s) {
+    auto stmt = [&](const std::unique_ptr<Statement>& s) -> std::unique_ptr<Statement> {
         if (s) {
             return this->inlineStatement(offset, varMap, returnVar, haveEarlyReturns, *s);
         }
-        return std::unique_ptr<Statement>(nullptr);
+        return nullptr;
     };
     auto stmts = [&](const std::vector<std::unique_ptr<Statement>>& ss) {
         std::vector<std::unique_ptr<Statement>> result;
@@ -2031,11 +2031,11 @@
         }
         return result;
     };
-    auto expr = [&](const std::unique_ptr<Expression>& e) {
+    auto expr = [&](const std::unique_ptr<Expression>& e) -> std::unique_ptr<Expression> {
         if (e) {
             return this->inlineExpression(offset, varMap, *e);
         }
-        return std::unique_ptr<Expression>(nullptr);
+        return nullptr;
     };
     switch (statement.fKind) {
         case Statement::kBlock_Kind: {