Clean up CPDF_BookmarkTree.

- Change GetFirstChild() and GetNextSibling() to take a const-ref
  parameter.
- Remove unused GetDocument().
- Change all variables to Chromium style.
- Fix a nit by flipping the logic of a comparison.

Change-Id: If4a69eea49b6fddb38ff1f4d6c5e2115b775d4bd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79301
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp
index 83d9a4a..551918f 100644
--- a/fpdfsdk/fpdf_doc.cpp
+++ b/fpdfsdk/fpdf_doc.cpp
@@ -48,13 +48,13 @@
   }
 
   // Go into children items.
-  CPDF_Bookmark child = tree.GetFirstChild(&bookmark);
+  CPDF_Bookmark child = tree.GetFirstChild(bookmark);
   while (child.GetDict() && !pdfium::Contains(*visited, child.GetDict())) {
     // Check this item and its children.
     CPDF_Bookmark found = FindBookmark(tree, child, title, visited);
     if (found.GetDict())
       return found;
-    child = tree.GetNextSibling(&child);
+    child = tree.GetNextSibling(child);
   }
   return CPDF_Bookmark();
 }
@@ -81,7 +81,7 @@
   CPDF_BookmarkTree tree(pDoc);
   CPDF_Bookmark cBookmark(CPDFDictionaryFromFPDFBookmark(bookmark));
   return FPDFBookmarkFromCPDFDictionary(
-      tree.GetFirstChild(&cBookmark).GetDict());
+      tree.GetFirstChild(cBookmark).GetDict());
 }
 
 FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
@@ -96,7 +96,7 @@
   CPDF_BookmarkTree tree(pDoc);
   CPDF_Bookmark cBookmark(CPDFDictionaryFromFPDFBookmark(bookmark));
   return FPDFBookmarkFromCPDFDictionary(
-      tree.GetNextSibling(&cBookmark).GetDict());
+      tree.GetNextSibling(cBookmark).GetDict());
 }
 
 FPDF_EXPORT unsigned long FPDF_CALLCONV